Skip to content

Instantly share code, notes, and snippets.

View kralion's full-sized avatar
🏠
Working from home

Brayan Paucar kralion

🏠
Working from home
View GitHub Profile
@kralion
kralion / helpHttp.js
Created November 26, 2022 15:11 — forked from jonmircha/helpHttp.js
Script que te permite simplificar peticiones HTTP con Fetch, esta escrita en VanillaJS por lo que puedes usarla con cualquier framework o librería
export const helpHttp = () => {
const customFetch = (endpoint, options) => {
const defaultHeader = {
accept: "application/json",
};
const controller = new AbortController();
options.signal = controller.signal;
options.method = options.method || "GET";