Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aurelle/http-fetcher

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurelle/http-fetcher - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

7

dist/http-fetcher.types.d.ts

@@ -53,2 +53,9 @@ import { HttpFetcherError } from "src/lib/http-fetcher-error";

}
export declare enum HttpMethod {
GET = "GET",
POST = "POST",
PUT = "PUT",
PATCH = "PATCH",
DELETE = "DELETE"
}
export interface HttpFetcherRequest<RequestBodyType = any> {

@@ -55,0 +62,0 @@ params: HttpFetcherQueryParams;

32

dist/index.js

@@ -37,3 +37,4 @@ var __defProp = Object.defineProperty;

HttpFetcher: () => HttpFetcher,
HttpFetcherError: () => HttpFetcherError
HttpFetcherError: () => HttpFetcherError,
HttpMethod: () => HttpMethod
});

@@ -157,3 +158,5 @@ module.exports = __toCommonJS(src_exports);

async get(url, { headers = {}, params = {} } = {}) {
const fetchRequest = new Request(this.makeUrl(url, params));
const fetchRequest = new Request(this.makeUrl(url, params), {
method: "GET"
});
const request = {

@@ -168,3 +171,5 @@ fetchRequest,

async post(url, body, { headers = {}, params = {} } = {}) {
const fetchRequest = new Request(this.makeUrl(url, params));
const fetchRequest = new Request(this.makeUrl(url, params), {
method: "POST"
});
const request = {

@@ -180,3 +185,5 @@ fetchRequest,

async put(url, body, { headers = {}, params = {} } = {}) {
const fetchRequest = new Request(this.makeUrl(url, params));
const fetchRequest = new Request(this.makeUrl(url, params), {
method: "PUT"
});
const request = {

@@ -192,3 +199,5 @@ fetchRequest,

async delete(url, { headers = {}, params = {} } = {}) {
const fetchRequest = new Request(this.makeUrl(url, params));
const fetchRequest = new Request(this.makeUrl(url, params), {
method: "DELETE"
});
const request = {

@@ -203,6 +212,17 @@ fetchRequest,

};
// src/http-fetcher.types.ts
var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
HttpMethod2["GET"] = "GET";
HttpMethod2["POST"] = "POST";
HttpMethod2["PUT"] = "PUT";
HttpMethod2["PATCH"] = "PATCH";
HttpMethod2["DELETE"] = "DELETE";
return HttpMethod2;
})(HttpMethod || {});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
HttpFetcher,
HttpFetcherError
HttpFetcherError,
HttpMethod
});

2

package.json
{
"name": "@aurelle/http-fetcher",
"version": "0.0.4",
"version": "0.0.5",
"description": "A blazing fast, lightweight and easy to use HTTP client based on the fetch API.",

@@ -5,0 +5,0 @@ "private": false,

@@ -155,3 +155,6 @@ import { JSON_HEADERS } from "src/constants";

): Promise<HttpFetcherResponse<ResponseType>> {
const fetchRequest = new Request(this.makeUrl(url, params));
const fetchRequest = new Request(this.makeUrl(url, params), {
method: "GET",
});
const request: HttpFetcherRequest = {

@@ -172,3 +175,5 @@ fetchRequest: fetchRequest,

): Promise<HttpFetcherResponse<ResponseType>> {
const fetchRequest = new Request(this.makeUrl(url, params));
const fetchRequest = new Request(this.makeUrl(url, params), {
method: "POST",
});
const request: HttpFetcherRequest = {

@@ -190,3 +195,5 @@ fetchRequest: fetchRequest,

): Promise<HttpFetcherResponse<ResponseType>> {
const fetchRequest = new Request(this.makeUrl(url, params));
const fetchRequest = new Request(this.makeUrl(url, params), {
method: "PUT",
});
const request: HttpFetcherRequest = {

@@ -207,3 +214,5 @@ fetchRequest: fetchRequest,

): Promise<HttpFetcherResponse<ResponseType>> {
const fetchRequest = new Request(this.makeUrl(url, params));
const fetchRequest = new Request(this.makeUrl(url, params), {
method: "DELETE",
});
const request: HttpFetcherRequest = {

@@ -210,0 +219,0 @@ fetchRequest: fetchRequest,

@@ -59,2 +59,10 @@ import { HttpFetcherError } from "src/lib/http-fetcher-error";

export enum HttpMethod {
GET = "GET",
POST = "POST",
PUT = "PUT",
PATCH = "PATCH",
DELETE = "DELETE",
}
export interface HttpFetcherRequest<RequestBodyType = any> {

@@ -61,0 +69,0 @@ params: HttpFetcherQueryParams;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc