On May 20, 10:38 pm, Cameron Kaiser <[email protected]> wrote: > > I've been playing with > > oacurlhttps://code.google.com/apis/buzz/v1/oacurl.html > > and tried to use it to send a tweet. > > > oacurl sends Expect: 100-Continue but Twitter rejects this with "we > > only allow the 100-continue expectation". > > > Is this fixable, or avoidable in the meantime? (I know about twurl, > > but oacurl seems generic - can I use twurl to make oauth calls to > > MySpace?) > > Just change the header to simply send a blank "Expect:". With regular > cURL a simple -H "Expect:" will work.
Thanks for your reply. Although oacurl supports -H like curl, using -H "Expect:" adds a second Expect: header to the request, & the Twitter server still fails because of Expect: 100-Continue. I'll raise the oacurl bug with one of the authors, but that still leaves a bug in Twitter's handling of Expect:. /c/download: echo "status=Testing+oacurl" | java -cp oacurl-1.0.0.jar com.google.oacurl.Fetch -X POST -H "Expect:" -v http://api.twitter.com/1/statuses/update.json > POST /1/statuses/update.json HTTP/1.1 > Content-Type: application/atom+xml > Expect: > Authorization: OAuth > oauth_token="34507306-fJYSoMdju3Vv9SecfdyCUbYu5JdlIPLyaVN3xElNw", > oauth_consumer_key="FFUZwLopTkug9Dlj1KamA", > oauth_signature_method="HMAC-SHA1", oauth_timestamp="1274396737", > oauth_nonce="571291495191528", oauth_version="1.0", > oauth_signature="CqiI%2FY%2Br96PGVPkCSClqnkmfHAo%3D" > Transfer-Encoding: chunked > Host: api.twitter.com > Connection: Keep-Alive > User-Agent: Apache-HttpClient/4.0 (java 1.5) > Expect: 100-Continue > status=Testing+oacurl[\n] -- Richard
