• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 657
  • Last Modified:

ASP - xmlhttp to Authentication Required page

I am trying to use the api as discussed at:

https://build.phonegap.com/docs/api

When I go to:

https://build.phonegap.com/api/v1/me

directly, it asks for username/password which I give and it logs me in successfully.

How do I achieve the same effect using xmlhttp?
0
shafferb1
Asked:
shafferb1
1 Solution
 
hieloCommented:
On the open() method, supply the username and password as the fourth argument.  Then set a the "Authorization" request header to the Base64 value of "username:password".

Refer to:
http://zanstra.home.xs4all.nl/inTec/ServerXMLHTTP.htm
http://stackoverflow.com/questions/1358550/xmlhttp-request-basic-authentication-issue
0
 
shafferb1Author Commented:
1st link worked well.
Thanks,
Ben
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now