@abdullahomran9 wrote:
hello ,
after i deployed my app on device " android " it wasn’t working proply because i used httpclient and i had problems with CORS .
now i am stuck for 5 days trying to do post request on native HTTP plugin! , take in mind I am using the same headers and data from the old code , but it keep telling me " You Must enter userID and pass" even though it is in the post request.this is the post request :
this.nativeHttp.post(this.url , {'pwd':'*****','userid':'******'}, {'withCredentials': 'true','accept':'*/*','accept-encoding':'gzip, deflate','content-type':'application/x-www-form-urlencoded; charset=UTF-8','user-agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36' } ) .then(response => { // prints 200 console.log(response), this.raw = response;}, err => { console.log('JS call err : ',err); });
the response status is :200 , but it is “You Must enter userID and pass” .
i tried changeing the user and pass methods but no luck .first this is the console log of my post :
this is a post from the PC browser and it is OK to compare :
finally i did send post request to https://postman-echo.com/ which will return my payload just to make sure , this is the post :
actually i am starting to get frustrated by this , and i will appreciate the help . thank you in advance .
Posts: 1
Participants: 1