Skip to content

@sourceloop/task-service / Exports / HttpClientService

Class: HttpClientService

Table of contents

Constructors

Methods

Constructors

constructor

new HttpClientService()

Methods

delete

delete(url, options?): Promise<unknown>

Parameters

Name Type
url string
options? HttpOptions

Returns

Promise<unknown>

Defined in

services/task-service/src/services/http.service.ts:23


get

get<T>(url, options?): Promise<T>

Type parameters

Name
T

Parameters

Name Type
url string
options? HttpOptions

Returns

Promise<T>

Defined in

services/task-service/src/services/http.service.ts:16


handleRes

Private handleRes<T>(res): Promise<T>

Type parameters

Name
T

Parameters

Name Type
res Response

Returns

Promise<T>

Defined in

services/task-service/src/services/http.service.ts:76


post

post<T>(url, body, options?): Promise<T>

Type parameters

Name
T

Parameters

Name Type
url string
body AnyObject
options? HttpOptions

Returns

Promise<T>

Defined in

services/task-service/src/services/http.service.ts:31


postFormData

postFormData<T>(url, body, options?): Promise<T>

Type parameters

Name
T

Parameters

Name Type
url string
body FormData
options? HttpOptions

Returns

Promise<T>

Defined in

services/task-service/src/services/http.service.ts:44


processOptions

Private processOptions(url, options?): Object

Parameters

Name Type
url string
options? HttpOptions

Returns

Object

Name Type
headers {}
url string

Defined in

services/task-service/src/services/http.service.ts:56


serialize

Private serialize(obj): string

Parameters

Name Type
obj AnyObject

Returns

string

Defined in

services/task-service/src/services/http.service.ts:88