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

FINALLY, a first test of Http_url_post_raw with Google Calendar. And there's a problem.



I'm getting back "HTTP/1.1 415 Unsupported Media Type." So I turned on 
debugging.

Here is the transcript from a successful Post from Google's own OAuth 
Playground:

> POST /calendar/feeds/default/private/full?alt=jsonc&xoauth_requestor_id=jamesl%40touchtonecorp.com HTTP/1.1
> Host: www.google.com
> Accept: */*
> Authorization: OAuth oauth_version="1.0", oauth_nonce="8c54babfee27438fe5f554daf8a478e3", oauth_timestamp=  . . .
> Content-Type: application/json
> GData-Version: 2.0
> Content-Length: 348
> 

And here is what turned up in the HTTPAPI debug log:

> POST /calendar/feeds/default/private/full?alt=jsonc&xoauth_requestor_id=jamesl%40touchtonecorp.com HTTP/1.1 
> Host: www.google.com                                                                                        
> User-Agent: http-api/1.23                                                                                   
> Content-Type: text/xml                                                                                      
> Expect: 100-continue                                                                                        
> Content-Length: 248                                                                                         
> Accept: */*                                                                                                 
> Authorization: OAuth oauth_version="1.0", oauth_nonce="JAMESL00ssRABBITssss337002320000", oauth_timestamp= . . .
> Content-Type: application/atom+xml                                                                          
> GData-Version: 2.0                                                                                          


It looks like HTTPAPI is trying to label my JSON data stream as an ATOM 
data stream, and I need to tell HTTPAPI that the post data is JSON. Is 
there another call I don't know about, to set that up?

--
JHHL
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------