> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/contributor/contributor-zh/chang-jing-yun-xing-shi/yun-xing-shi-mo-kuai/signed-fetch.md).

# 签名获取

该 `SignedFetch` 模块提供了……的实现 `fetch` 该接口透明地符合…… [签名请求](https://github.com/decentraland/docs/blob/main/auth/signed_fetch/README.md) 该协议，定义了如何附加已签名的 [认证链](https://github.com/decentraland/docs/blob/main/auth/authchain/README.md) 到出站请求中。

对该请求进行签名和验证的步骤详见 [认证链](https://github.com/decentraland/docs/blob/main/contributor/auth/authchain/README.md) 页面。

使用 `SignedFetch` 在场景中使用……需要 [`USE_FETCH`](https://github.com/decentraland/docs/blob/main/contributor/content/entity-types/scenes/README.md#permissions) 权限。

### 方法

**`signedFetch`**

像使用（[`fetch`](https://github.com/decentraland/docs/blob/main/contributor/globals/README.md#http)）那样发出 HTTP 请求，自动添加验证头。

```ts
接口 Request {
  // 请求目标 URL：
  url: string;

  // 请求的可选、自解释参数：
  init?: {
    method?: string;
    body?: string;
    headers: { [key: string]: string };
  };
}

interface Response {
  // HTTP 请求是否成功执行（非 2xx 状态码不视为失败）
  ok: boolean;

  // 响应的自解释细节：
  status: number;
  statusText: string;
  headers: { [key: string]: string };
  body: string;
}

function signedFetch(Request): Promise<Response>;
```


---

# 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.decentraland.org/contributor/contributor-zh/chang-jing-yun-xing-shi/yun-xing-shi-mo-kuai/signed-fetch.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.
