mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
fix(http): export via window.IonicNative (#675)
* 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 ba6a7e9930
This commit is contained in:
parent
5b060345d2
commit
cf7abe110d
@ -52,6 +52,7 @@ import { GooglePlus } from './plugins/google-plus';
|
|||||||
import { GoogleMap } from './plugins/googlemaps';
|
import { GoogleMap } from './plugins/googlemaps';
|
||||||
import { GoogleAnalytics } from './plugins/googleanalytics';
|
import { GoogleAnalytics } from './plugins/googleanalytics';
|
||||||
import { Hotspot } from './plugins/hotspot';
|
import { Hotspot } from './plugins/hotspot';
|
||||||
|
import { HTTP } from './plugins/http';
|
||||||
import { Httpd } from './plugins/httpd';
|
import { Httpd } from './plugins/httpd';
|
||||||
import { IBeacon } from './plugins/ibeacon';
|
import { IBeacon } from './plugins/ibeacon';
|
||||||
import { ImagePicker } from './plugins/imagepicker';
|
import { ImagePicker } from './plugins/imagepicker';
|
||||||
@ -266,6 +267,7 @@ window['IonicNative'] = {
|
|||||||
GoogleMap,
|
GoogleMap,
|
||||||
GoogleAnalytics,
|
GoogleAnalytics,
|
||||||
Hotspot,
|
Hotspot,
|
||||||
|
HTTP,
|
||||||
Httpd,
|
Httpd,
|
||||||
IBeacon,
|
IBeacon,
|
||||||
ImagePicker,
|
ImagePicker,
|
||||||
|
@ -35,7 +35,8 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
@Plugin({
|
@Plugin({
|
||||||
plugin: 'cordova-plugin-http',
|
plugin: 'cordova-plugin-http',
|
||||||
pluginRef: 'cordovaHTTP',
|
pluginRef: 'cordovaHTTP',
|
||||||
repo: 'https://github.com/wymsee/cordova-HTTP'
|
repo: 'https://github.com/wymsee/cordova-HTTP',
|
||||||
|
platforms: ['Android', 'iOS']
|
||||||
})
|
})
|
||||||
export class HTTP {
|
export class HTTP {
|
||||||
|
|
||||||
@ -118,11 +119,11 @@ export class HTTP {
|
|||||||
* @param body {Object} The body of the request
|
* @param body {Object} The body of the request
|
||||||
* @param headers {Object} The headers to set for this request
|
* @param headers {Object} The headers to set for this request
|
||||||
* @param filePath {string} The local path of the file to upload
|
* @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
|
* @return {Promise<HTTPResponse>} returns a promise that resolve on success, and reject on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@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; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -134,8 +135,6 @@ export class HTTP {
|
|||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static downloadFile(url: string, body: any, headers: any, filePath: string): Promise<HTTPResponse> { return; }
|
static downloadFile(url: string, body: any, headers: any, filePath: string): Promise<HTTPResponse> { return; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HTTPResponse {
|
export interface HTTPResponse {
|
||||||
|
Loading…
Reference in New Issue
Block a user