@dc0de/http-client
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -116,2 +116,7 @@ "use strict"; | ||
}; | ||
HttpClient.prototype.patch = function(url, options) { | ||
return this.request( | ||
tslib_1.__assign({}, options, { url: url, method: "PATCH" }) | ||
); | ||
}; | ||
HttpClient.prototype.delete = function(url, options) { | ||
@@ -118,0 +123,0 @@ return this.request( |
@@ -103,2 +103,5 @@ import { compile } from "path-to-regexp"; | ||
}; | ||
HttpClient.prototype.patch = function(url, options) { | ||
return this.request(__assign({}, options, { url: url, method: "PATCH" })); | ||
}; | ||
HttpClient.prototype.delete = function(url, options) { | ||
@@ -105,0 +108,0 @@ return this.request(__assign({}, options, { url: url, method: "DELETE" })); |
{ | ||
"private": false, | ||
"license": "MIT", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"name": "@dc0de/http-client", | ||
@@ -6,0 +6,0 @@ "description": "Simple HttpClient built on top of Axios and RxJS", |
@@ -23,4 +23,5 @@ import { Observable } from "rxjs"; | ||
put<T>(url: string, options?: Omit<HttpClientRequestConfig, "url" | "method">): Observable<HttpClientResponse<T>>; | ||
patch<T>(url: string, options?: Omit<HttpClientRequestConfig, "url" | "method">): Observable<HttpClientResponse<T>>; | ||
delete<T>(url: string, options?: Omit<HttpClientRequestConfig, "url" | "data" | "method">): Observable<HttpClientResponse<T>>; | ||
request<T>(options: HttpClientRequestConfig): Observable<HttpClientResponse<T>>; | ||
} |
import { HttpClientRequestMethod } from "./HttpClientRequestMethod"; | ||
declare type FlatObject = { | ||
[key: string]: null | number | string | undefined; | ||
}; | ||
export interface HttpClientRequestConfig { | ||
readonly method: HttpClientRequestMethod; | ||
readonly url: string; | ||
readonly pathParams?: object; | ||
readonly queryParams?: object; | ||
readonly pathParams?: FlatObject; | ||
readonly queryParams?: FlatObject; | ||
readonly data?: object; | ||
readonly headers?: object; | ||
readonly headers?: FlatObject; | ||
readonly timeout?: number; | ||
} | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
export declare type HttpClientRequestMethod = "GET" | "POST" | "PUT" | "DELETE"; | ||
export declare type HttpClientRequestMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; |
Sorry, the diff of this file is not supported yet
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
51902
539