Help/error
第1行: | 第1行: | ||
+ | == help/error == | ||
+ | HTTP请求返回状态码及错误信息说明 | ||
+ | |||
=== HTTP状态码: === | === HTTP状态码: === | ||
微博接口API将对每次请求返回以下错误码中的一种: | 微博接口API将对每次请求返回以下错误码中的一种: | ||
* 200 OK: 执行成功! | * 200 OK: 执行成功! | ||
* 304 Not Modified: 没有数据返回. | * 304 Not Modified: 没有数据返回. | ||
− | * 400 Bad Request: 请求数据不合法,或者超过请求频率限制. | + | * 400 Bad Request: 请求数据不合法,或者超过请求频率限制. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* 401 Not Authorized: 没有进行身份验证. | * 401 Not Authorized: 没有进行身份验证. | ||
* 402 Not Start mblog: 没有开通微博 | * 402 Not Start mblog: 没有开通微博 | ||
第30行: | 第14行: | ||
* 502 Bad Gateway: 微博接口API关闭或正在升级 . | * 502 Bad Gateway: 微博接口API关闭或正在升级 . | ||
* 503 Service Unavailable: 服务端资源不可用. | * 503 Service Unavailable: 服务端资源不可用. | ||
+ | |||
+ | === 错误信息说明: === | ||
+ | 当调用API发生错误时,将返回对应格式请求的错误信息, | ||
+ | 如XML信息: | ||
+ | <?xml version="1.0" encoding="UTF-8"?> | ||
+ | <hash> | ||
+ | <request>/direct_messages/destroy/456.xml</request> | ||
+ | <error_code>500<error_code> | ||
+ | <error>No direct message with that ID found.</error> | ||
+ | </hash> | ||
+ | |||
+ | json信息: | ||
+ | {"request","/direct_messages/destroy/456.xml","error_code":"500","error":"No direct message with that ID found."} |
2010年11月17日 (三) 13:39的版本
help/error
HTTP请求返回状态码及错误信息说明
HTTP状态码:
微博接口API将对每次请求返回以下错误码中的一种:
- 200 OK: 执行成功!
- 304 Not Modified: 没有数据返回.
- 400 Bad Request: 请求数据不合法,或者超过请求频率限制.
- 401 Not Authorized: 没有进行身份验证.
- 402 Not Start mblog: 没有开通微博
- 403 Forbidden: 没有权限访问对应的资源.
- 404 Not Found: 请求的资源不存在.
- 500 Internal Server Error: 服务器内部错误.
- 502 Bad Gateway: 微博接口API关闭或正在升级 .
- 503 Service Unavailable: 服务端资源不可用.
错误信息说明:
当调用API发生错误时,将返回对应格式请求的错误信息, 如XML信息:
<?xml version="1.0" encoding="UTF-8"?> <hash> <request>/direct_messages/destroy/456.xml</request> <error_code>500<error_code> <error>No direct message with that ID found.</error> </hash>
json信息:
{"request","/direct_messages/destroy/456.xml","error_code":"500","error":"No direct message with that ID found."}