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

@libj/http

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libj/http - npm Package Compare versions

Comparing version 0.3.4 to 0.4.0

4

dist/client/HttpClient.d.ts

@@ -1,2 +0,2 @@

import { HttpClientConfig, HttpRequestOptions, HttpResponse, HttpSubmitArgs } from './types';
import { GetRequestOptions, HttpClientConfig, HttpRequestOptions, HttpResponse, HttpSubmitArgs } from './types';
import { LooseObject } from '../common/types';

@@ -6,3 +6,3 @@ export declare class HttpClient {

/*** Public ***/
get<D = LooseObject>(url: string, options?: HttpRequestOptions): Promise<HttpResponse<D>>;
get<D = LooseObject>(url: string, options?: GetRequestOptions): Promise<HttpResponse<D>>;
post<D = LooseObject>(...args: HttpSubmitArgs): Promise<HttpResponse<D>>;

@@ -9,0 +9,0 @@ request<D = LooseObject>(url: string, options?: HttpRequestOptions): Promise<HttpResponse<D>>;

@@ -20,2 +20,3 @@ "use strict";

var httpLoggerInterceptor_1 = require("../interceptors/httpLoggerInterceptor");
var src_2 = require("@libj/make-uri");
var HttpClient = /** @class */ (function () {

@@ -34,3 +35,4 @@ function HttpClient(config) {

if (options === void 0) { options = {}; }
return this.request(url, __assign(__assign({}, options), { method: src_1.HttpMethod.GET }));
var finalUrl = options.query ? src_2.makeUri(url, { query: options.query }) : url;
return this.request(finalUrl, __assign(__assign({}, options), { method: src_1.HttpMethod.GET }));
};

@@ -37,0 +39,0 @@ HttpClient.prototype.post = function () {

@@ -7,2 +7,5 @@ import { AxiosRequestConfig, AxiosResponse } from 'axios';

}
export interface GetRequestOptions extends HttpRequestOptions {
query?: LooseObject;
}
export interface HttpClientConfig extends HttpRequestOptions {

@@ -9,0 +12,0 @@ logger?: LoggerInterface;

{
"dependencies": {
"@libj/http-meta": "0.1.6",
"@libj/logger": "0.0.6",
"@libj/http-meta": "0.1.7",
"@libj/logger": "0.0.7",
"axios": "^0.21.1",
"form-data": "^4.0.0",
"fs-extra": "^8.1.0"
"fs-extra": "^8.1.0",
"@libj/make-uri": "1.1.15"
},
"name": "@libj/http",
"version": "0.3.4",
"version": "0.4.0",
"description": "Http toolbox",

@@ -34,3 +35,3 @@ "author": "Sergey Poskachey <seregynp@gmail.com>",

],
"gitHead": "9f86083862e66b5d34d2fdb6954bb3d6d7d563e4"
"gitHead": "6c43d4cf33363d328e000d2e2b4dec997450a6ef"
}

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