addBasicAuthenticationHeaderWithUsername:andPassword: method

Constructs a basic authentication header from the username and password supplied, and adds it to the request headers Used when shouldPresentCredentialsBeforeChallenge is YES.

Syntax

- ( void ) addBasicAuthenticationHeaderWithUsername : ( NSString * ) theUsername andPassword : ( NSString * ) thePassword