错误:在创建新的日历事件api时无法读取请求正文。 [英] ERROR : Cannot read the request body while creating new calendar event api.

查看:107
本文介绍了错误:在创建新的日历事件api时无法读取请求正文。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


 

Hi, 


我尝试使用[POST]&https://outlook.office365.com/api/v1.0/me/events和[PATCH]创建和更新日历活动  ; HTTPS://outlook.office365.com/api/v1.0/me/events/< EVENTID>分别。

I was trying to create and update the calendar event using [POST] https://outlook.office365.com/api/v1.0/me/events and [PATCH] https://outlook.office365.com/api/v1.0/me/events/<eventId> respectively.


当我尝试使用海报或邮递员时,我收到此错误

When i try with poster or postman, I get this error

{error: {code: "ErrorInvalidRequest" message: "Cannot read the request body."} }




它不起作用。任何帮助将不胜感激。

its not working . Any help will be appreciated.


注意:GET事件和DELETE事件正在运行。我认为带有效负载的API不起作用。

Note: GET events and DELETE Events are working. I think the API with payload is not working.


测试数据:

Test Data :

推荐答案

嗨Sahil,

Hi Sahil,

我能够让你的请求对我的Office 365 邮箱进行2次更改的工作正常。

I was able to make your request work fine against my Office 365 mailbox with 2 changes.

1。您能否确保添加标题"Content-Type:Application / Json"?

1. Can you please make sure you are adding header "Content-Type: Application/Json"?

2。你能否确定你的结束时间是在开始时间之后? 看起来您的当前请求有拼写错误,因为开始时间是2015-01-06,结束时间是2015-01-05。

2. Can you please make sure your end time is AFTER start time?  Looks like there is a typo with your current request as the start time is on 2015-01-06 and end time is on 2015-01-05.

希望有帮助...

谢谢,

Venkat

Thanks,
Venkat


这篇关于错误:在创建新的日历事件api时无法读取请求正文。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆