Comparing version 1.1.0 to 1.1.1
@@ -10,2 +10,3 @@ const { request } = require('https'); | ||
let { redirect=true } = opts; | ||
if (uri && !!uri.toJSON) uri = uri.toJSON(); | ||
Object.assign(opts, typeof uri === 'string' ? parse(uri) : uri); | ||
@@ -12,0 +13,0 @@ opts.agent = opts.protocol === 'http:' ? globalAgent : void 0; |
@@ -1,2 +0,2 @@ | ||
import {Url} from "url"; | ||
import {Url, URL} from "url"; | ||
import {IncomingMessage} from "http"; | ||
@@ -17,5 +17,5 @@ | ||
export declare function send<T = any>(method: string, uri: string | Url, opts?: Partial<HttpieOptions>): Promise<HttpieResponse<T>>; | ||
export declare function send<T = any>(method: string, uri: string | Url | URL, opts?: Partial<HttpieOptions>): Promise<HttpieResponse<T>>; | ||
declare function method<T = any>(uri: string | Url, opts?: Partial<HttpieOptions>): Promise<HttpieResponse<T>>; | ||
declare function method<T = any>(uri: string | Url | URL, opts?: Partial<HttpieOptions>): Promise<HttpieResponse<T>>; | ||
@@ -22,0 +22,0 @@ export { |
{ | ||
"name": "httpie", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"repository": "lukeed/httpie", | ||
@@ -5,0 +5,0 @@ "description": "A lightweight, Promise-based wrapper for Node.js HTTP requests~!", |
@@ -27,3 +27,3 @@ <div align="center"> | ||
* Automatically handles JSON requests and responses | ||
* Extremely lightweight with **no dependencies** – 634 bytes! | ||
* Extremely lightweight with **no dependencies** – 649 bytes! | ||
* Includes aliases for common HTTP verbs: `get`, `post`, `put`, `patch`, and `del` | ||
@@ -30,0 +30,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14331
8
175