Skip to content

Latest commit

 

History

History
522 lines (307 loc) · 15.6 KB

File metadata and controls

522 lines (307 loc) · 15.6 KB

c8osdkjscoreC8oHttpInterface

Class: C8oHttpInterface

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new C8oHttpInterface(c8o: C8o): C8oHttpInterface

Overrides C8oHttpInterfaceCore.constructor

Defined in lib/c8oHttpInterface.service.ts:5

Parameters:

Name Type
c8o C8o

Returns: C8oHttpInterface

Properties

Protected _isCordova

_isCordova: any = null

Inherited from C8oHttpInterfaceCore._isCordova

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:17


c8o

c8o: C8oCore

Inherited from C8oHttpInterfaceCore.c8o

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:13


firstCall

firstCall: boolean = true

Inherited from C8oHttpInterfaceCore.firstCall

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:15


firstcheckSessionR

firstcheckSessionR: boolean

Inherited from C8oHttpInterfaceCore.firstcheckSessionR

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:18


p1

p1: Promise‹Object›

Inherited from C8oHttpInterfaceCore.p1

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:16


timeout

timeout: number

Inherited from C8oHttpInterfaceCore.timeout

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:14

Methods

checkFile

checkFile(parameters: Object): number

Inherited from C8oHttpInterfaceCore.checkFile

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:255

Check type of file given in parameters 0 : No file to upload 1 : FileList Or File 2 : url when running in cordova

Parameters:

Name Type
parameters Object

Returns: number


execHttpPosts

execHttpPosts(url: string, parameters: any, headers: any, resolve: any, reject: any, headers_return: boolean, doLogin: boolean): void

Inherited from C8oHttpInterfaceCore.execHttpPosts

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:178

Execute http Posts

Parameters:

Name Type Default Description
url string - -
parameters any - -
headers any - -
resolve any - -
reject any -
headers_return boolean false -
doLogin boolean false -

Returns: void


forceInit

forceInit(): void

Inherited from C8oHttpInterfaceCore.forceInit

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:62

Returns: void


getHeaders

getHeaders(object: any): any

Overrides C8oHttpInterfaceCore.getHeaders

Defined in lib/c8oHttpInterface.service.ts:15

get headers;

Parameters:

Name Type Description
object any headers object

Returns: any


getUserServiceStatus

getUserServiceStatus(observe?: any): Promise‹any›

Inherited from C8oHttpInterfaceCore.getUserServiceStatus

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:113

Call user service

Parameters:

Name Type
observe? any

Returns: Promise‹any›


getuploadRequester

getuploadRequester(url: string, form: FormData, headersObject: any): Observable‹any›

Overrides C8oHttpInterfaceCore.getuploadRequester

Defined in lib/c8oHttpInterface.service.ts:25

Angular implementation to post with progress

Parameters:

Name Type Description
url string the url to post
form FormData the form data to post
headersObject any Headers to use

Returns: Observable‹any›


handleProgress

handleProgress(event: any, progress: C8oProgress, parameters: any, c8oResponseListener: C8oResponseListener, varNull: JSON): void

Inherited from C8oHttpInterfaceCore.handleProgress

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:578

Handle progress

Parameters:

Name Type Description
event any -
progress C8oProgress -
parameters any -
c8oResponseListener C8oResponseListener -
varNull JSON

Returns: void


handleRequest

handleRequest(url: string, parameters: Object, c8oResponseListener?: C8oResponseListener): Promise‹any›

Inherited from C8oHttpInterfaceCore.handleRequest

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:408

Handle the request

Parameters:

Name Type
url string
parameters Object
c8oResponseListener? C8oResponseListener

Returns: Promise‹any›


handleResponseFileUpload

handleResponseFileUpload(event: any, progress: C8oProgress, parameters: Object, c8oResponseListener: C8oResponseListener, varNull: any, resolve: any): void

Inherited from C8oHttpInterfaceCore.handleResponseFileUpload

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:543

handle FileuploadResponses

Parameters:

Name Type Description
event any -
progress C8oProgress -
parameters Object -
c8oResponseListener C8oResponseListener -
varNull any -
resolve any

Returns: void


httpGetObservable

httpGetObservable(uri: any, param1: any, param2: any): any

Inherited from C8oHttpInterfaceCore.httpGetObservable

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:71

Method to bastract http get

Parameters:

Name Type Default Description
uri any - the uri for given request
param1 any null -
param2 any null -

Returns: any


httpPost

httpPost(url: string, parameters: Object): Promise‹any›

Inherited from C8oHttpInterfaceCore.httpPost

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:147

Make an http post

Parameters:

Name Type
url string
parameters Object

Returns: Promise‹any›


httpPostObservable

httpPostObservable(uri: any, param1: any, param2: any): any

Inherited from C8oHttpInterfaceCore.httpPostObservable

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:101

Method to bastract http post

Parameters:

Name Type Description
uri any the uri for given request
param1 any -
param2 any -

Returns: any


Protected isCordova

isCordova(): boolean

Inherited from C8oHttpInterfaceCore.isCordova

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:294

Check if we are in cordova environment

Returns: boolean


isHttpResponse

isHttpResponse(event: any): boolean

Overrides C8oHttpInterfaceCore.isHttpResponse

Defined in lib/c8oHttpInterface.service.ts:35

test type of request

Parameters:

Name Type Description
event any any

Returns: boolean


transformRequest

transformRequest(parameters: Object): string

Inherited from C8oHttpInterfaceCore.transformRequest

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:311

Url encode parameters

Parameters:

Name Type
parameters Object

Returns: string


transformRequestfileNative

transformRequestfileNative(parameters: Object): any

Inherited from C8oHttpInterfaceCore.transformRequestfileNative

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:375

Extract file from parameters and return and array containing a file and params

Parameters:

Name Type
parameters Object

Returns: any


transformRequestformdata

transformRequestformdata(parameters: Object): FormData

Inherited from C8oHttpInterfaceCore.transformRequestformdata

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:335

Transform FormData parameters

Parameters:

Name Type
parameters Object

Returns: FormData


uploadFileHttp

uploadFileHttp(url: string, form: FormData, parameters: Object, c8oResponseListener: C8oResponseListener): Promise‹any›

Inherited from C8oHttpInterfaceCore.uploadFileHttp

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:487

Upload File using an Http client

Parameters:

Name Type
url string
form FormData
parameters Object
c8oResponseListener C8oResponseListener

Returns: Promise‹any›


uploadFilePluginNative

uploadFilePluginNative(url: string, parameters: Object, c8oResponseListener: C8oResponseListener): Promise‹any›

Inherited from C8oHttpInterfaceCore.uploadFilePluginNative

Defined in c8osdk-js-core/src/c8o/c8oHttpInterfaceCore.ts:436

Upload file with native plugin

Parameters:

Name Type
url string
parameters Object
c8oResponseListener C8oResponseListener

Returns: Promise‹any›