Skip to content

Instantly share code, notes, and snippets.

View mokadev90's full-sized avatar
🎯
Focusing

mokadev mokadev90

🎯
Focusing
  • MENDOZA, ARGENTINA
  • 11:15 (UTC -03:00)
View GitHub Profile
@jonmircha
jonmircha / helpHttp.js
Last active July 15, 2024 22:58
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";