Re: [Snowy] Crash when doing PUT



On Fri, 2009-08-07 at 08:37 -0700, Sandy Armstrong wrote:
> Both ways *should* be acceptable, but I've only tested using the
> Authorization header.

I changed my code and I'm now using the Authorization header.
Unfortunately the response is still the same :(

Also I upgraded Django to the latest SVN version, but still the same. It
would be nice if someone could tell me what the error message means or
where it comes from.
Maybe someone could send me the wireshark output of a successful
conversation between Tomboy and Snowy. One where Tomboy is putting new
notes onto Snowy. I'm having troubles installing the latest Tomboy,
otherwise I would do it myself...

Below is the new conversation. This time with the OAuth stuff in the
headers. Please have a close look at my request. I'm new to OAuth, REST,
etc. so maybe I'm just making some stupid mistake.

Thanks!
Conny


PUT /api/1.0/root/notes/ HTTP/1.1
User-Agent: liboauth-agent
Host: 127.0.0.1:8000
Accept: */*
Content-Type: application/json
Authorization: OAuth realm="Snowy", oauth_consumer_key="root",
oauth_nonce="fZAvBxnjo39y8WxxH3qjDZ4z",
oauth_signature_method="HMAC-SHA1", oauth_timestamp="1249672347",
oauth_token="4uUnR6tgGMbQynNP2A", oauth_version="1.0",
oauth_signature="ynOE1r7Co%2FqX1Hevo1H64z2LQ4I%3D"
Content-Length: 425

{ "note-changes" : [ { "note-content" : "One line of content",
"pinned" : false, "last-meta-data-change-date" :
"2009-08-07T10:00:45.0000000+02:00", "guid" :
"4621178a-5c4a-4d2f-a473-1bff040ea575", "create-date" :
"2009-08-07T10:00:32.0000000+02:00", "open-on-startup" : false,
"note-content-version" : 0.1, "last-change-date" :
"2009-08-07T10:00:45.0000000+02:00", "title" : "New Note 123" } ],
"latest-sync-revision" : -1 }


HTTP/1.0 400 BAD REQUEST
Date: Fri, 07 Aug 2009 19:12:27 GMT
Server: WSGIServer/0.1 Python/2.5.2
Vary: Authorization, Accept-Language, Cookie
Content-Type: text/html; charset=utf-8
Content-Language: en-us

Piston/0.2 (Django 1.2 pre-alpha) crash report:

Method signature does not match.

Resource does not expect any parameters.

Exception was: cannot concatenate 'str' and 'int' objects






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]