
# 返回结果
#### 状态码
请求发送以后，您会收到响应，包含状态码、响应消息头和消息体。
状态码是一组数字代码，状态码表示了请求响应的状态，如果调用后返回状态码为2xx，则表示调用成功。完整的状态码列表请参见[状态码](https://support.huaweicloud.com/api-ocr/ocr_03_0090.html)。
#### 响应消息头
对应请求消息头，响应同样也有消息头，如"Content-type"。例如[表1]所示。
 表1响应消息头 
| 名称             | 说明                  |
|:---|:---|
| Content-Length | 响应消息体的字节长度，单位为Byte。 |
| Date           | 系统响应的时间。            |
| Content-Type   | 响应消息体的MIME类型。       |
   
#### 响应消息体
响应消息体通常以结构化格式返回，与响应消息头中Content-type对应，传递除响应消息头之外的内容。
对于[网络图片识别 - RecognizeWebImage](https://support.huaweicloud.com/api-ocr/ocr_03_0108.html)接口，返回如下消息体。
```
{ 
  "result": { 
      "words_block_count": 2, 
      "words_block_list": [ 
          { 
              "words": "文字块1", 
              "confidence": 0.9950,
              "location": [ 
                  [13, 476], 
                  [91, 332], 
                  [125, 351], 
                  [48, 494] 
              ] 
          }, 
          { 
              "words": "文字块2", 
              "confidence": 0.9910,
              "location": [ 
                  [13, 476], 
                  [91, 332], 
                  [125, 351], 
                  [48, 494] 
              ] 
          } 
      ],
      "extracted_data": {}
  } 
}
```
当接口调用出错时，会返回错误码及错误信息说明，错误响应的Body体格式如下所示。
```
{
    "error_code": "AIS.0103", 
    "error_msg": "The image size does not meet the requirements." 
}
```
其中，error_code表示错误码，error_msg表示错误描述信息。
