semifor/Net-Twitter — pull request #43 by ediblenergy (2014-04-11 18:20:19+00:00)
Title: use HTTP::Request::Common when possible, put query params in content, co...

...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.