Skip to content

Instantly share code, notes, and snippets.

@umer936
umer936 / fetch_wrapper.js
Last active May 22, 2023 16:30 — forked from Billcountry/LICENSE.md
A wrapper for fetch that takes jQuery ajax type setup
/**
* @umer936, umer936/ajaxFetchWrapper.js
* https://gist.github.com/umer936/c6bdbd80b8620dea5dfe7eac5e57b000
* modified from: Billcountry/fetch_wrapper.js
*
* @param options Object of options:
{
beforeSend (function): null,
url (string): "",
type (string): if data => "POST", otherwise "GET",