Signed Fetch
Métodos
interface Request {
// A URL alvo da requisição:
url: string;
// Parâmetros opcionais e autoexplicativos para a requisição:
init?: {
method?: string;
body?: string;
headers: { [key: string]: string };
};
}
interface Response {
// Se a requisição HTTP foi realizada 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>;Atualizado