procket
v1.0.4
Published
Make requests easy
Downloads
2
Readme
Procket it's a promise based HTTP client for the browser and node.js for HTTP requests.
Installation
Use the package manager npm to install this package.
npm install procket
Usage
import procket from "procket";
const procket = new Procket();
procket.get("url");
procket.get("url", {
header: { "Content-Type": "application/json" },
timeout: 20 * 1000
}); //with headers and timeout
procket.post("url", { name: "John" });
procket.post(
"url",
{ name: "John" },
{
header: { "Content-Type": "application/json" },
timeout: 20 * 1000
}
); //with headers and timeout
procket.put("url", { name: "John" });
procket.put(
"url",
{ name: "John" },
{
header: { "Content-Type": "application/json" },
timeout: 20 * 1000
}
); //with headers and timeout
procket.delete("url", { name: "John" });
procket.delete(
"url",
{ name: "John" },
{
header: { "Content-Type": "application/json" },
timeout: 20 * 1000
}
); //with headers and timeout
License
Licensed under The MIT License (MIT) For the full copyright and license information, please view the LICENSE.txt file.