diff --git a/src/index.ts b/src/index.ts index 66fbca981..81cad6053 100644 --- a/src/index.ts +++ b/src/index.ts @@ -52,6 +52,7 @@ import { GooglePlus } from './plugins/google-plus'; import { GoogleMap } from './plugins/googlemaps'; import { GoogleAnalytics } from './plugins/googleanalytics'; import { Hotspot } from './plugins/hotspot'; +import { HTTP } from './plugins/http'; import { Httpd } from './plugins/httpd'; import { IBeacon } from './plugins/ibeacon'; import { ImagePicker } from './plugins/imagepicker'; @@ -266,6 +267,7 @@ window['IonicNative'] = { GoogleMap, GoogleAnalytics, Hotspot, + HTTP, Httpd, IBeacon, ImagePicker, diff --git a/src/plugins/http.ts b/src/plugins/http.ts index 39b4b229f..ac96557dc 100644 --- a/src/plugins/http.ts +++ b/src/plugins/http.ts @@ -1,4 +1,4 @@ -import {Plugin, Cordova} from './plugin'; +import { Plugin, Cordova } from './plugin'; /** * @name HTTP * @description @@ -35,7 +35,8 @@ import {Plugin, Cordova} from './plugin'; @Plugin({ plugin: 'cordova-plugin-http', pluginRef: 'cordovaHTTP', - repo: 'https://github.com/wymsee/cordova-HTTP' + repo: 'https://github.com/wymsee/cordova-HTTP', + platforms: ['Android', 'iOS'] }) export class HTTP { @@ -118,11 +119,11 @@ export class HTTP { * @param body {Object} The body of the request * @param headers {Object} The headers to set for this request * @param filePath {string} The local path of the file to upload - * @param fileParameter {string} The name of the parameter to pass the file along as + * @param name {string} The name of the parameter to pass the file along as * @return {Promise} returns a promise that resolve on success, and reject on failure */ @Cordova() - static uploadFile(url: string, body: any, headers: any, filePath: string, fileParameter: string): Promise { return; } + static uploadFile(url: string, body: any, headers: any, filePath: string, name: string): Promise { return; } /** * @@ -134,8 +135,6 @@ export class HTTP { */ @Cordova() static downloadFile(url: string, body: any, headers: any, filePath: string): Promise { return; } - - } export interface HTTPResponse {