parse.com - Logging Into Site Using Javascript HTTP Request? -


i'm attempting log nike account using http requests , parse. here's request:

parse.cloud.httprequest({       method: 'post',       headers: {         'content-type' : 'application/x-www-form-urlencoded; charset=utf-8'       },       url: 'https://www.nike.com/profile/login',       params: {           'content-locale' : 'en_us',       },       body: {           'login' : <userid>,           'rememberme' : 'true',           'password' : '<password>'       }     }).then(function(httpresponse) {        //log       console.log(httpresponse.text);     }, function(httpresponse) {        //log       console.error('request failed response code ' + httpresponse.status); }); 

i'm using rest call function, , it's working correctly. problem keeps returning 403 error. there i'm doing wrong request?

here info of actual request found in safari when logging in through browser (note: i'm new http requests).

enter image description here

update:

the image above of valid login using web browser.

also, here's image of request , response section more details:

enter image description here

i don't believe there's wrong request structure, if consistently seeing 403 - forbidden response. implies request being rejected due cross-origin restrictions, improper or unexpected request headers and/or spoofing referrer , origin, etc.

but without knowing details of nike's login services, can speculate.

i expect see other http responses 400 bad request, 406 not acceptable, 500 timeout, etc if there fundamentally wrong request.

to answer, we'd need know more details environment requests made from. local server? nike developer access internal nike.com environments? http request being initiated from?

the best can suggest information provided tools troubleshoot further:

  • charles proxy: monitor outgoing requests + responses
  • postman: convenient testing of request structures in more pure, browser/tech agnostic way

i can't post more 2 links yet, search cross origin access , http status codes more details on general http requests.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -