Welcome Guest, Not a member yet? Register   Sign In
Ajax post not working, can't figure this one out
#7

(02-20-2021, 09:15 AM)superior Wrote: EDIT:
And just like that i've found the problem, the header send in the Ajax request 'Content-Type: application/json' caused my issue. The minute i removed that from the headers array i'm receiving the post with $request->getPost();.

Congratulations. But why did you put the header then?

Something I already forgot how this your jQuery works.  Big Grin

Exclamation $_POST An associative array of variables passed to the current script via the HTTP POST method when using application/x-www-form-urlencoded or multipart/form-data as the HTTP Content-Type in the request.
Reply


Messages In This Thread
RE: Ajax post not working, can't figure this one out - by iRedds - 02-20-2021, 10:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB