user1845209
user1845209

Reputation: 2311

set http header asihttprequest

I am using ASIFormDataRequest to post to web service. Now my server programmer says I should set HTTP headers and pass folowing parameters: username='value' and password='value'. This is because the web service uses authentication. How should i do this?

Upvotes: 0

Views: 245

Answers (1)

Gabriele Petronella
Gabriele Petronella

Reputation: 108101

[request addBasicAuthenticationHeaderWithUsername:@"yourUsername"
                                      andPassword:@"yourPassw"];

For more information about HTTP Authentication check out the ASIHTTP documentation about it.

Upvotes: 2

Related Questions