Skip to content

This is a simple script in which you're given a function that will make a request (GET or POST). with only the url as argument and the method, by default is set to GET.

Notifications You must be signed in to change notification settings

N-bred/MakeRequest_helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MakeRequest Script

This script will help you out by giving you a ready to use function which will accept 2 arguments, the first being the url you want to make the request to, and the second one is to declare the type of request: GET or POST, GET is set as the default.

It uses the fecth API, the .then and .catch functions to get the data from the url.

You can also use the Async way, which can be seen as cleaner code.

This is by no means an advance level code, i made it because i wanted to practice requests in JS, so feel free to give some advice or even improve the code.

Best regards, N-bred.

About

This is a simple script in which you're given a function that will make a request (GET or POST). with only the url as argument and the method, by default is set to GET.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published