Skip to content

Commit

Permalink
feat(http): update declaration for cordova plugin version 2.4.0 (#3298)
Browse files Browse the repository at this point in the history
* feat(HTTP): update declaration for cordova plugin version 2.3.0

* feat(HTTP): update declaration for cordova plugin version 2.4.0
  • Loading branch information
silkimen authored and danielsogl committed Jan 27, 2020
1 parent 2b2eb88 commit 799cf94
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/@ionic-native/plugins/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class HTTP extends IonicNativePlugin {
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setdataserializer
*/
@Cordova({ sync: true })
setDataSerializer(serializer: 'urlencoded' | 'json' | 'utf8' | 'multipart'): void {}
setDataSerializer(serializer: 'urlencoded' | 'json' | 'utf8' | 'multipart' | 'raw'): void {}

/**
* Add a custom cookie.
Expand Down Expand Up @@ -290,6 +290,18 @@ export class HTTP extends IonicNativePlugin {
return;
}

/**
* Make an OPTIONS request
* @param url {string} The url to send the request to
* @param parameters {Object} Parameters to send with the request
* @param headers {Object} The headers to set for this request
* @returns {Promise<HTTPResponse>} returns a promise that will resolve on success, and reject on failure
*/
@Cordova()
options(url: string, parameters: any, headers: any): Promise<HTTPResponse> {
return;
}

/**
*
* @param url {string} The url to send the request to
Expand Down Expand Up @@ -337,7 +349,7 @@ export class HTTP extends IonicNativePlugin {
sendRequest(
url: string,
options: {
method: 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'upload' | 'download';
method: 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'upload' | 'download';
data?: { [index: string]: any };
params?: { [index: string]: string | number };
serializer?: 'json' | 'urlencoded' | 'utf8' | 'multipart';
Expand Down

0 comments on commit 799cf94

Please sign in to comment.