semifor / Net-Twitter

A Perl interface to the Twitter APIs
83 stars 37 forks source link

use HTTP::Request::Common when possible, put query params in content, co... #43

Closed samuelckaufman closed 10 years ago

samuelckaufman commented 10 years ago

...ntent-type added

Re: https://dev.twitter.com/docs/api/advertising/updates/20140326#Require_PUT_to_include_the_Content-Length_Header

"We have made a change across of Twitter inbound traffic that now enforces the behavior in the spec around PUTs. This means we require the Content-Length header for PUTs now. We'd like to remind partners that we suggest that all PUTs pass the request parameters within the body of the request.

If you encounter this error, you'll receive a HTTP 411 - Length Required error response from the API.'

Emphasis added, in actuality putting the params in as Query params will result in a 401. Also, leaving out the content-type will result in a 401.