> 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-pt/runtime-da-scene/modulos-de-runtime/signed-fetch.md).

# Fetch assinado

O `SignedFetch` o módulo fornece uma implementação da `fetch` interface que é transparentemente compatível com o [signed fetch](https://github.com/decentraland/docs/tree/main/auth/signed_fetch/README.md) protocolo, que define como anexar assinadas [cadeias de autenticação](https://github.com/decentraland/docs/tree/main/auth/authchain/README.md) às solicitações de saída.

Os procedimentos para assinar e verificar esta solicitação são detalhados na [serializada em JSON](https://github.com/decentraland/docs/tree/main/contributor/auth/authchain/README.md) página.

Usando `SignedFetch` de uma cena requer o [`USE_FETCH`](https://github.com/decentraland/docs/tree/main/contributor/content/entity-types/scenes/README.md#permissions) permissão.

### Métodos

**`signedFetch`**

Faça uma solicitação HTTP como faria com ([`fetch`](https://github.com/decentraland/docs/tree/main/contributor/globals/README.md#http)), adicionando automaticamente os cabeçalhos de verificação.

```ts
interface Request {
  // A URL de destino da solicitação:
  url: string;

  // Parâmetros opcionais e autoexplicativos para a solicitação:
  init?: {
    method?: string;
    body?: string;
    headers: { [key: string]: string };
  };
}

interface Response {
  // Se a solicitação HTTP foi executada com sucesso (códigos diferentes de 2xx não são falhas)
  ok: boolean;

  // Os detalhes autoexplicativos da resposta:
  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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/contributor/contributor-pt/runtime-da-scene/modulos-de-runtime/signed-fetch.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
