> On Jul 4, 2015, at 11:04 AM, Rick Mann <rm...@latencyzero.com> wrote:
> 
> FWIW, you're setting the Accept header, not Content-Type (nor 
> Accept-Language).

Yup. And I’m pretty sure you [the OP] don’t want to add that Accept header to 
all requests, since it’s telling the server to give up (with a 406 status) if 
the response type isn’t application/xml. Generally you only want to use an 
Accept header for requests whose body will have a response, and which response 
can optionally be delivered with different content types. For example an API 
that lets you download an image as either JPEG or PNG.

Instead you want to set the Content-Type for this request, and just add that 
header to the one request you’re sending.

(Sending a GET request with a body is pretty unusual, but I assume that’s what 
the server wants since you say the curl command works…)

Also +1 to taking this to macnetworkprog.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to