@minotaur-ergo/http
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -26,2 +26,97 @@ { | ||
"slug": "request" | ||
}, | ||
{ | ||
"name": "get", | ||
"signature": "(options: HttpOptions) => Promise<HttpResponse>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "", | ||
"type": "HttpOptions" | ||
} | ||
], | ||
"returns": "Promise<HttpResponse>", | ||
"tags": [], | ||
"docs": "", | ||
"complexTypes": [ | ||
"HttpResponse", | ||
"HttpOptions" | ||
], | ||
"slug": "get" | ||
}, | ||
{ | ||
"name": "post", | ||
"signature": "(options: HttpOptions) => Promise<HttpResponse>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "", | ||
"type": "HttpOptions" | ||
} | ||
], | ||
"returns": "Promise<HttpResponse>", | ||
"tags": [], | ||
"docs": "", | ||
"complexTypes": [ | ||
"HttpResponse", | ||
"HttpOptions" | ||
], | ||
"slug": "post" | ||
}, | ||
{ | ||
"name": "put", | ||
"signature": "(options: HttpOptions) => Promise<HttpResponse>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "", | ||
"type": "HttpOptions" | ||
} | ||
], | ||
"returns": "Promise<HttpResponse>", | ||
"tags": [], | ||
"docs": "", | ||
"complexTypes": [ | ||
"HttpResponse", | ||
"HttpOptions" | ||
], | ||
"slug": "put" | ||
}, | ||
{ | ||
"name": "patch", | ||
"signature": "(options: HttpOptions) => Promise<HttpResponse>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "", | ||
"type": "HttpOptions" | ||
} | ||
], | ||
"returns": "Promise<HttpResponse>", | ||
"tags": [], | ||
"docs": "", | ||
"complexTypes": [ | ||
"HttpResponse", | ||
"HttpOptions" | ||
], | ||
"slug": "patch" | ||
}, | ||
{ | ||
"name": "delete", | ||
"signature": "(options: HttpOptions) => Promise<HttpResponse>", | ||
"parameters": [ | ||
{ | ||
"name": "options", | ||
"docs": "", | ||
"type": "HttpOptions" | ||
} | ||
], | ||
"returns": "Promise<HttpResponse>", | ||
"tags": [], | ||
"docs": "", | ||
"complexTypes": [ | ||
"HttpResponse", | ||
"HttpOptions" | ||
], | ||
"slug": "delete" | ||
} | ||
@@ -28,0 +123,0 @@ ], |
export interface HttpPlugin { | ||
request(options: HttpOptions): Promise<HttpResponse>; | ||
get(options: HttpOptions): Promise<HttpResponse>; | ||
post(options: HttpOptions): Promise<HttpResponse>; | ||
put(options: HttpOptions): Promise<HttpResponse>; | ||
patch(options: HttpOptions): Promise<HttpResponse>; | ||
delete(options: HttpOptions): Promise<HttpResponse>; | ||
} | ||
@@ -4,0 +9,0 @@ declare type HttpResponseType = 'arraybuffer' | 'blob' | 'json' | 'text' | 'document'; |
@@ -5,2 +5,7 @@ import { WebPlugin } from '@capacitor/core'; | ||
request(options: HttpOptions): Promise<HttpResponse>; | ||
get(options: HttpOptions): Promise<HttpResponse>; | ||
post(options: HttpOptions): Promise<HttpResponse>; | ||
put(options: HttpOptions): Promise<HttpResponse>; | ||
patch(options: HttpOptions): Promise<HttpResponse>; | ||
delete(options: HttpOptions): Promise<HttpResponse>; | ||
} |
@@ -12,3 +12,18 @@ import { WebPlugin } from '@capacitor/core'; | ||
} | ||
get(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'GET' })); | ||
} | ||
post(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'POST' })); | ||
} | ||
put(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'PUT' })); | ||
} | ||
patch(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'PATCH' })); | ||
} | ||
delete(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'DELETE' })); | ||
} | ||
} | ||
//# sourceMappingURL=web.js.map |
@@ -22,2 +22,17 @@ 'use strict'; | ||
} | ||
get(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'GET' })); | ||
} | ||
post(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'POST' })); | ||
} | ||
put(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'PUT' })); | ||
} | ||
patch(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'PATCH' })); | ||
} | ||
delete(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'DELETE' })); | ||
} | ||
} | ||
@@ -24,0 +39,0 @@ |
@@ -19,2 +19,17 @@ var capacitorHttp = (function (exports, core) { | ||
} | ||
get(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'GET' })); | ||
} | ||
post(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'POST' })); | ||
} | ||
put(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'PUT' })); | ||
} | ||
patch(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'PATCH' })); | ||
} | ||
delete(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'DELETE' })); | ||
} | ||
} | ||
@@ -21,0 +36,0 @@ |
@@ -147,4 +147,19 @@ 'use strict'; | ||
} | ||
get(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'GET' })); | ||
} | ||
post(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'POST' })); | ||
} | ||
put(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'PUT' })); | ||
} | ||
patch(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'PATCH' })); | ||
} | ||
delete(options) { | ||
return this.request(Object.assign(Object.assign({}, options), { method: 'DELETE' })); | ||
} | ||
} | ||
exports.Http = Http; | ||
//# sourceMappingURL=plugin.js.map |
{ | ||
"name": "@minotaur-ergo/http", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Cors Free Http Client", | ||
@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js", |
@@ -17,2 +17,7 @@ # @minotaur-ergo/http | ||
* [`request(...)`](#request) | ||
* [`get(...)`](#get) | ||
* [`post(...)`](#post) | ||
* [`put(...)`](#put) | ||
* [`patch(...)`](#patch) | ||
* [`delete(...)`](#delete) | ||
* [Interfaces](#interfaces) | ||
@@ -41,2 +46,77 @@ * [Type Aliases](#type-aliases) | ||
### get(...) | ||
```typescript | ||
get(options: HttpOptions) => Promise<HttpResponse> | ||
``` | ||
| Param | Type | | ||
| ------------- | --------------------------------------------------- | | ||
| **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> | | ||
**Returns:** <code>Promise<<a href="#httpresponse">HttpResponse</a>></code> | ||
-------------------- | ||
### post(...) | ||
```typescript | ||
post(options: HttpOptions) => Promise<HttpResponse> | ||
``` | ||
| Param | Type | | ||
| ------------- | --------------------------------------------------- | | ||
| **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> | | ||
**Returns:** <code>Promise<<a href="#httpresponse">HttpResponse</a>></code> | ||
-------------------- | ||
### put(...) | ||
```typescript | ||
put(options: HttpOptions) => Promise<HttpResponse> | ||
``` | ||
| Param | Type | | ||
| ------------- | --------------------------------------------------- | | ||
| **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> | | ||
**Returns:** <code>Promise<<a href="#httpresponse">HttpResponse</a>></code> | ||
-------------------- | ||
### patch(...) | ||
```typescript | ||
patch(options: HttpOptions) => Promise<HttpResponse> | ||
``` | ||
| Param | Type | | ||
| ------------- | --------------------------------------------------- | | ||
| **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> | | ||
**Returns:** <code>Promise<<a href="#httpresponse">HttpResponse</a>></code> | ||
-------------------- | ||
### delete(...) | ||
```typescript | ||
delete(options: HttpOptions) => Promise<HttpResponse> | ||
``` | ||
| Param | Type | | ||
| ------------- | --------------------------------------------------- | | ||
| **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> | | ||
**Returns:** <code>Promise<<a href="#httpresponse">HttpResponse</a>></code> | ||
-------------------- | ||
### Interfaces | ||
@@ -43,0 +123,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
63003
693
165
1