mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-04 00:13:06 +08:00
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:
parent
2b2eb88a64
commit
799cf94674
@ -139,7 +139,7 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setdataserializer
|
* @see https://github.com/silkimen/cordova-plugin-advanced-http#setdataserializer
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
setDataSerializer(serializer: 'urlencoded' | 'json' | 'utf8' | 'multipart'): void {}
|
setDataSerializer(serializer: 'urlencoded' | 'json' | 'utf8' | 'multipart' | 'raw'): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a custom cookie.
|
* Add a custom cookie.
|
||||||
@ -290,6 +290,18 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
return;
|
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
|
* @param url {string} The url to send the request to
|
||||||
@ -337,7 +349,7 @@ export class HTTP extends IonicNativePlugin {
|
|||||||
sendRequest(
|
sendRequest(
|
||||||
url: string,
|
url: string,
|
||||||
options: {
|
options: {
|
||||||
method: 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'upload' | 'download';
|
method: 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'upload' | 'download';
|
||||||
data?: { [index: string]: any };
|
data?: { [index: string]: any };
|
||||||
params?: { [index: string]: string | number };
|
params?: { [index: string]: string | number };
|
||||||
serializer?: 'json' | 'urlencoded' | 'utf8' | 'multipart';
|
serializer?: 'json' | 'urlencoded' | 'utf8' | 'multipart';
|
||||||
|
Loading…
Reference in New Issue
Block a user