feat(http): update declaration for cordova plugin version 2.4.0 (#3298)

* feat(HTTP): update declaration for cordova plugin version 2.3.0

* feat(HTTP): update declaration for cordova plugin version 2.4.0
This commit is contained in:
Sefa Ilkimen 2020-01-27 06:18:05 +01:00 committed by Daniel Sogl
parent 2b2eb88a64
commit 799cf94674

View File

@ -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.
@ -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
@ -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';