I want to call a rest service via http adapter. I do a get request to the url of the rest service but it is in a password protected domain. (if i try to access the url from browser it pops up a window for username and password.) How can i pass these credentials along with my get request? do i have to make a post request before that?
Asked
Active
Viewed 318 times
2
-
Maybe this will provide some insight: http://stackoverflow.com/questions/17700910/attaching-cookie-to-worklight-adapter-response-header – Idan Adar Mar 14 '14 at 14:58
-
The two answers in this question might also shed some light: http://stackoverflow.com/questions/16921978/authorizing-http-adapter-in-ibm-worklight – eabe Mar 15 '14 at 18:36
1 Answers
3
Use the element of the HTTP adapter.
<authentication>
<basic/>
<serverIdentity>
<username> ${user} </username>
<password> ${password} </password>
</serverIdentity>
</authentication>
It will pass the network credential while accessing the service url.

Ragu
- 402
- 1
- 4
- 18