Re: Can't set header on NSURLRequest
Re: Can't set header on NSURLRequest
- Subject: Re: Can't set header on NSURLRequest
- From: Doug Knowles <email@hidden>
- Date: Tue, 2 Jun 2009 09:13:43 -0400
Hi, Chris,
I had a similar problem the other day. Are you using an
NSMutableURLRequest?
Doug K;
On Tue, Jun 2, 2009 at 2:44 AM, Chris <email@hidden> wrote:
> Hello,
>
> I'm having an issue with setting two headers for my NSURLRequest:
>
> [theRequest setValue: [NSString stringWithFormat:@"/principals/__uids__/%@/\r\n",self.userGUID]
> forHTTPHeaderField:@"Originator"];
>
> [theRequest setValue: [NSString stringWithFormat:@"/principals/__uids__/%@/\r\n",roomGUID]
> forHTTPHeaderField:@"Recipient"];
>
> When I send the request they don't appear in the headers and the server
> fails to respond correctly as they are required headers. I also tried
> addValue:forHTTPHeaderField, with the same result.
>
> If I set them without the NSString (@"string...") it works fine. Am I
> missing something here?
>
> Thanks!
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden