In my PHP endpoint, I have logged a serialized array of POST values, but am unable to access any items within the array. I know the array isn't empty, because I can see the values when I serialize it. Here is the serialized array:
a:1:@s:13:"{"answer":42";s:0:"";}
What does the at sign (@) mean?
Additional information:
If I call end() or reset() on the unserialized array, both return an empty string.
In the javascript application where I make the POST request, I stringify an object and then use that string as the body of the post:
let b = {answer: 42}
...
body: JSON.stringify(b)
I use fetch to make the POST. The content-type header for my POST is 'application/x-www-form-urlencoded', though I'm open to using something else if appropriate. I tried 'text/html; charset=utf-8' as well, but in that case the array is empty.