Http Google Calendar V3 REST API中的批处理请求
如何通过V3 REST API使用批处理请求获取/添加/更新Google日历事件?我试过了,但没用。根据docs(),应该可以通过向API发布多部分/混合内容类型消息来发送批处理请求。一个可以工作的HTTP POST示例将非常好 谢谢,Http Google Calendar V3 REST API中的批处理请求,http,rest,google-api,google-calendar-api,gdata-api,Http,Rest,Google Api,Google Calendar Api,Gdata Api,如何通过V3 REST API使用批处理请求获取/添加/更新Google日历事件?我试过了,但没用。根据docs(),应该可以通过向API发布多部分/混合内容类型消息来发送批处理请求。一个可以工作的HTTP POST示例将非常好 谢谢, Riyaz以下批处理请求,获取eventId1,更新eventId2,并在Calendar下创建一个用calendarId标识的新事件 POST /batch HTTP/1.1 Authorization: /*Auth token*/ Host: host C
Riyaz以下批处理请求,获取eventId1,更新eventId2,并在Calendar下创建一个用calendarId标识的新事件
POST /batch HTTP/1.1
Authorization: /*Auth token*/
Host: host
Content-Type: multipart/mixed; boundary=batch_foobarbaz
Content-Length: total_content_length
--batch_foobarbaz
Content-Type: application/http
Content-ID: <item1:x@barnyard.example.com>
GET /calendar/v3/calendars/calendarId/events/eventId1
--batch_foobarbaz
Content-Type: application/http
Content-ID: <item2:x@barnyard.example.com>
PUT /calendar/v3/calendars/calendarId/events/eventId2
Content-Type: application/json
Content-Length: part_content_length
{{ body }}
--batch_foobarbaz
Content-Type: application/http
Content-ID: <item3:x@barnyard.example.com>
POST /calendar/v3/calendars/calendarId/events
Content-Type: application/json
Content-Length: part_content_length
{{ body }}
--batch_foobarbaz--
POST/batch HTTP/1.1
授权:/*授权令牌*/
主持人:主持人
内容类型:多部分/混合;边界=批次
内容长度:总内容长度
--巴巴兹
内容类型:应用程序/http
内容ID:
GET/calendar/v3/calendars/calendarId/events/eventId1
--巴巴兹
内容类型:应用程序/http
内容ID:
PUT/calendar/v3/calendars/calendarId/events/eventId2
内容类型:application/json
内容长度:部分内容长度
{{body}}
--巴巴兹
内容类型:应用程序/http
内容ID:
POST/calendar/v3/calendars/calendarId/events
内容类型:application/json
内容长度:部分内容长度
{{body}}
--巴巴兹--
端点是
这在我处理日历批处理请求时适用。我遇到的一个问题是,我的最后一个边界标记后面没有
--
。因此,每个令牌都以--
开头,最后一个令牌的结尾是--
。正如@Burcu Dogan的示例所示。用于批处理请求的完整url是什么。我尝试使用“”,但失败了…请告诉我