This sample demonstrates a basic structure that you can use to perform 3-legged OAuth using the Google Data Python client library in Google App Engine. This particular example talks to the Documents List Data API.
Note: The sample is available in two versions, one that signs requests with RSA-SHA1 and another that signs with HMAC-SHA1.
Showing posts with label gdata. Show all posts
Showing posts with label gdata. Show all posts
OAuth in Google App Engine
Posted by
Eric (Google)
on
Monday, April 06, 2009
Labels:
app engine,
DocList,
gdata,
oauth,
python
Performing a GET with a POST using a Data API
Posted by
Jeff Fisher
on
Tuesday, August 19, 2008
Sometimes you can only do a GET when you need to do a DELETE, since some systems don't support all of the HTTP verbs. Also since Flash doesn't let you set a custom Authorization header on a GET, sometimes you need to do a GET with a POST.
How can you do this? With the X-HTTP-Method-Override header:
X-HTTP-Method-Override: GETFor example, say you want to perform a video search in YouTube using a POST request:
POST /feeds/api/videos HTTP/1.1 Host: gdata.youtube.com X-HTTP-Method-Override: GET Content-Length: 23 Content-Type: application/x-www-form-urlencoded vq=kitten&max-results=1This is the same as performing a GET on http://gdata.youtube.com/feeds/api/videos?vq=kitten&max-results=1 The POST body is used as the set of query parameters. You can also do this using the curl command:
curl -H "X-HTTP-Method-Override: GET" -X POST http://gdata.youtube.com/feeds/api/videos -d "vq=kitten&max-results=1"
Subscribe to:
Comments (Atom)