Skip to content

Commit

Permalink
fix(http): export via window.IonicNative (#675)
Browse files Browse the repository at this point in the history
* fix(http): fix export system module

* style(http): fix angular style

* style(http): delete multiline

* chore(http): add attribute platforms to decorator Plugin

* fix(http): typo param uploadFile()

* fix(http): typo commit ba6a7e9
  • Loading branch information
ramonornela authored and ihadeed committed Oct 11, 2016
1 parent 5b06034 commit cf7abe1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -266,6 +267,7 @@ window['IonicNative'] = {
GoogleMap,
GoogleAnalytics,
Hotspot,
HTTP,
Httpd,
IBeacon,
ImagePicker,
Expand Down
11 changes: 5 additions & 6 deletions src/plugins/http.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Plugin, Cordova} from './plugin';
import { Plugin, Cordova } from './plugin';
/**
* @name HTTP
* @description
Expand Down Expand Up @@ -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 {

Expand Down Expand Up @@ -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<HTTPResponse>} 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<HTTPResponse> { return; }
static uploadFile(url: string, body: any, headers: any, filePath: string, name: string): Promise<HTTPResponse> { return; }

/**
*
Expand All @@ -134,8 +135,6 @@ export class HTTP {
*/
@Cordova()
static downloadFile(url: string, body: any, headers: any, filePath: string): Promise<HTTPResponse> { return; }


}

export interface HTTPResponse {
Expand Down

0 comments on commit cf7abe1

Please sign in to comment.