Skip to content

Commit

Permalink
fix(http): add correct return types for downloadFile and uploadFile
Browse files Browse the repository at this point in the history
closes: #2615
  • Loading branch information
danielsogl committed Jul 29, 2018
1 parent c2fe5f8 commit 4092831
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/@ionic-native/plugins/http/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class HTTP extends IonicNativePlugin {
* This returns an object representing a basic HTTP Authorization header of the form.
* @param username {string} Username
* @param password {string} Password
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64encodedusernameandpassword'}
* @returns {Object} an object representing a basic HTTP Authorization header of the form {'Authorization': 'Basic base64EncodedUsernameAndPassword'}
*/
@Cordova({ sync: true })
getBasicAuthHeader(
Expand Down Expand Up @@ -283,7 +283,7 @@ export class HTTP extends IonicNativePlugin {
* @param headers {Object} The headers to set for this request
* @param filePath {string} The local path of the file to upload
* @param name {string} The name of the parameter to pass the file along as
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
* @returns {Promise<FileEntry>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
uploadFile(
Expand All @@ -292,7 +292,7 @@ export class HTTP extends IonicNativePlugin {
headers: any,
filePath: string,
name: string
): Promise<HTTPResponse> {
): Promise<FileEntry> {
return;
}

Expand All @@ -301,16 +301,16 @@ export class HTTP extends IonicNativePlugin {
* @param url {string} The url to send the request to
* @param body {Object} The body of the request
* @param headers {Object} The headers to set for this request
* @param filePath {string} The path to donwload the file to, including the file name.
* @returns {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
* @param filePath {string} The path to download the file to, including the file name.
* @returns {Promise<FileEntry>} returns a promise that resolve on success, and reject on failure
*/
@Cordova()
downloadFile(
url: string,
body: any,
headers: any,
filePath: string
): Promise<HTTPResponse> {
): Promise<FileEntry> {
return;
}
}

0 comments on commit 4092831

Please sign in to comment.