[Lazarus] Google APIs
markbass72
markbass72 at gmail.com
Fri May 15 11:53:09 CEST 2015
On 15/05/2015 10:22, Michael Van Canneyt wrote:
>
> Better ask questions here. I don't use the forum, I'm old school.
> But I have answered on the forum.
>
from forum:
>you can set the webclient.logfile to some valid filename and examine the resulting
file after the request. It should contain the complete response of google
>Note that you better use the Patch method if you're just changing some properties.
Following the response for:
FCalendarAPI.EventsResource.Update(FCurrentCalendar.ID, entry.id, Entry);
that is the same (except for 1st line where response begins with
"Request : PATCH https://...") for:
FCalendarAPI.EventsResource.Patch(FCurrentCalendar.ID, entry.id, Entry);
maybe missing headers?
thanks
--------------------------------------------------------------------------------
Request : PUT
https://www.googleapis.com/calendar/v3/calendars/accountXYZ@gmail.com/events/f8umj295ncoahohqh2o8rjrsbc
Headers:
Authorization: Bearer
ya29.dAGRj9MlacyM-TxfnKGMKjpAQNhL2U61xxrMjzk05LbLHPFqYNVg6llBTpL_jj0DrxLx9TVCDBfAjw
Body:
{ "description" : "bla bla bla[modified]" }
--------------------------------------------------------------------------------
Response : 400 : Bad Request
Headers:
HTTP/1.0 400 Bad Request
Vary: X-Origin
Content-Type: application/json; charset=UTF-8
Date: Fri, 15 May 2015 09:12:07 GMT
Expires: Fri, 15 May 2015 09:12:07 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alternate-Protocol: 443:quic,p=1
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Body:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "badContent",
"message": "Unsupported content with type: text/html"
}
],
"code": 400,
"message": "Unsupported content with type: text/html"
}
}
More information about the Lazarus
mailing list