Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Problem with setRequestHeader

$
0
0

Hi,

I'm trying to call RestFull API and wants to send the credentials using headers. It works perfectly fine for android and using POSTMAN or Advanced Rest Client. but the app crashes in iOS.

xhr.setRequestHeader("Username", Username);
xhr.setRequestHeader("Password", Password);
after searching for this issue i found out that for iOS we have to use
xhr.setRequestHeader("Cookie", "Username=" + Username);
xhr.setRequestHeader("Cookie", "Password=" + Password);
after using this headers received at server side are blank.

Is there any other way to pass the parameters using headers in iOS?

Titanium SDK = 3.5.0

iOS target = 7.1 and 8.1

REST API with POST method.

Thanks in Advance.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>