Re: HTTP Headers
Re: HTTP Headers
- Subject: Re: HTTP Headers
- From: Uli Kusterer <email@hidden>
- Date: Sat, 3 May 2008 23:52:15 +0200
Am 03.05.2008 um 23:35 schrieb Jeremy:
Is there an easy way within Obj-C to read HTTP headers, to write
HTTP headers, and to send HTTP headers? As this will be the easiest
way for me to authenticate for an XML API I am using, and to read
http status codes (if the action was completed - or the error).
NSURLRequest and NSURLHandle (or was it NSURLConnection?) let you do
that. Anyway, a search for NSURL at http://developer.apple.com should
provide the right name for the APIs involved. You essentially pass in
a dictionary with the header name as the key and the header content as
the value. Of course that means that you can't easily have several
headers with the same name (like it'd be done for an SMTP server), but
for most uses it works.
There might even be sample code for doing HTTP GET or POST requests at http://cocoadev.com
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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