Skydrive重命名文件 - 无效的JSON对象 [英] Skydrive rename file - Invalid JSON Object

查看:67
本文介绍了Skydrive重命名文件 - 无效的JSON对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

使用REST API在Skydrive上重新保存文件时遇到问题。

I'm facing a problem when using the REST API to remane a file on Skydrive.

其他关于API的功能很好,但是没有重命名。

Other funtions on the API are working good, but rename not.

我完全按照文档中的描述进行操作。

I'm doing exactly as described in the documentation.

PUT https://apis.live.net/v5.0/file.a6b2a7e8f2515e5e.A6B2A7E8F2515E5E!126 Authorization: Bearer ACCESS_TOKEN Content-Type: application/json { "name": "MyNewFileName.doc" }

我收到了这个JSON:

I'm receiving back this JSON:

{    "错误":{      "code":"request_body_invalid",       " message":"请求实体正文不是有效的JSON对象。"   }

{   "error": {      "code": "request_body_invalid",       "message": "The request entity body isn't a valid JSON object."   }}

提前致谢!

Fabio

推荐答案

该请求在我的某个文件上正常运行。 你确定Content-Length标题是否正确?

That request works fine for me on one of my files.  Are you sure the Content-Length header is correct?


这篇关于Skydrive重命名文件 - 无效的JSON对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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