Question: From Original website redirecting to another webapplication. After logining into that webapp, needs to redirect to original site along with the Cookie set in the redirected site. I can code only on original website code. is it possible to fetch the cookie set by the redirect site ? Consider both web apps running in same webserver.

Answer: 
You should create your own instance of AFHTTPClient, when you need to add headers or extend it. You can create sharedInstance as singleton and then call the instance method to set username and password.

```
+ (AFHTTPClient *)sharedClient{
    static AFHTTPClient *_sharedClient = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
            _sharedClient = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:@"your_server_url"]];
        [_sharedClient setAuthorizationHeaderWithUsername:@"username" password:@"password"];
    });

    return _sharedClient;
}

```
Thanks for the help, but failed.

You are returning the following error:

```
Request failed: unacceptable content-type: text/html
NSLocalizedDescription = Request failed: unacceptable content-type: text/html.

```

I believe that the server is returning in `text/html` and the code is expecting JSON.