Skip to content

Instantly share code, notes, and snippets.

View kralion's full-sized avatar
🌍
Bridging ideas between ideas and reality

Brayan Paucar kralion

🌍
Bridging ideas between ideas and reality
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";