ApiImpl
@hyperledger/identus-sdk v8.0.0
@hyperledger/identus-sdk / overview / ApiImpl
Class: ApiImpl
Defined in: packages/lib/sdk/src/edge-agent/helpers/FetchApi.ts:6
Implement API using built in fetch
Implements
Constructors
Constructor
new ApiImpl():
FetchApi
Returns
FetchApi
Methods
request()
request<
T>(method:HttpMethod,urlStr:string,urlParameters?:Map<string,string>,httpHeaders?:Map<string,string>,body?:string|Record<string,any>):Promise<ApiResponse<T>>
Defined in: packages/lib/sdk/src/edge-agent/helpers/FetchApi.ts:7
make a request return an ApiResponse on any 2xx status throw ApiError otherwise
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
method | HttpMethod | - |
urlStr | string | - |
urlParameters | Map<string, string> | - |
httpHeaders | Map<string, string> | - |
body? | string | Record<string, any> | - |
Returns
Promise<ApiResponse<T>>