After quite a few more days I am still having issues with this.
I am trying to post to an external API, using application/x-www-form-urlencoded, and am dumping/echoing the posted variables on the server.
OK, so if I use postman to post to the same url as I do within the app, using these headers:
array(10) {
["Content-Length"]=
string(2) "25"
["Content-Type"]=
string(33) "application/x-www-form-urlencoded"
["Accept"]=
string(3) "/"
["Accept-Encoding"]=
string(13) "gzip, deflate"
["Cache-Control"]=
string(8) "no-cache"
["Connection"]=
string(10) "keep-alive"
["Cookie"]=
string(51) "ci_session=523c1e6349ba759c1e59afd5ce434b9bce4ffc7b"
["Host"]=
string(21) "dashboard.cmg-org.com"
["Postman-Token"]=
string(36) "7c072e87-e399-4a77-985f-e9acb4c43d5a"
["User-Agent"]=
string(20) "PostmanRuntime/6.4.1"
}
I get this response:
string(35) "{"email":"alans","password":"pass"}"
Which is what I expect to get.
BUT
When using the appery app, posting to the same URL, using these headers:
Accept:application/json, text/plain, /
Accept-Encoding:gzip, deflate, br
Accept-Language:en-GB,en-US;q=0.9,en;q=0.8
Connection:keep-alive
Content-Length:52
Content-Type:application/x-www-form-urlencoded
email:alans
Host:api.appery.io
Origin:https://appery.io
password:pass
Referer:https://appery.io/app/view/27ffc72a-2...
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
I get this response:
string(30) "{"email":null,"password":null}"
The app is sending the data in the header, query string and via form data, as is shown in this image:
But I cannot get to any of this data on the server, everything is blank, even though it is working via postman.
Can you see anything in the above which is not right and preventing this data being available on the server?
Please?