> For the complete documentation index, see [llms.txt](https://docs.exoclick.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exoclick.com/api/zh/exoclick-gong-gong-api/api-manual-http-headers.md).

# HTTP 头

本节描述 API 将接受来自任何请求的 HTTP 标头。

## 内容类型

所有请求都必须包含 content-type HTTP 标头。

### 可接受的内容类型

| 基本格式 | 内容类型                | 内容类型                    |
| ---- | ------------------- | ----------------------- |
| JSON | application/json    | 目前 text/json 不是可接受的内容类型 |
| 表单数据 | multipart/form-data | 仅在上传变体时使用               |

### Content-Type 错误

| 响应代码 | 备注                          |
| ---- | --------------------------- |
| 400  | 已理解内容类型，但无法解码。更多信息将显示在响应正文中 |
| 415  | 内容类型缺失或不受支持                 |

{% hint style="info" %}
**注意**：如果 content-type 标头有问题，响应内容类型将使用 API 的默认格式，目前为 application/json
{% endhint %}

{% hint style="info" %}
**注意**：API 当前不遵循 Accept-type HTTP 标头；只要请求的 content-type 有效，所有响应都会以与接收到的请求相同的 content-type 发送
{% endhint %}

## 授权

此标头是可选的，用于向 API 提供当前用户的身份验证详细信息，使当前用户能够访问受限的 API 资源。令牌可通过 Login API 获取。标头示例如下：

```
Authorization: Bearer 45267dbe480c8c7d799c62ccad92cb44f67ab086
```

Authorization 标头接受一个由两部分组成的字符串，两部分之间用一个空格分隔。第一部分是令牌类型，第二部分是访问令牌本身。

### 授权错误

| 响应代码 | 备注               |
| ---- | ---------------- |
| 400  | 提供了格式错误的授权标头     |
| 401  | 授权标头缺失，或令牌无效或已过期 |

### 选择授权令牌类型

在任何失败情况下，响应标头都将包含一个 WWW-Authenticate 标头，其中会指明访问所需的令牌类型。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.exoclick.com/api/zh/exoclick-gong-gong-api/api-manual-http-headers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
