Class FederationHttpClient
Constructors
constructor
-
Parameters
-
host: string
-
Optional username: string
Properties
Readonly httpClient
httpClient: Got
Methods
delete
- delete<T>(endpoints: Endpoints, options?: OptionsOfJSONResponseBody): Promise<T>
-
Type parameters
Parameters
-
-
Optional options: OptionsOfJSONResponseBody
Returns Promise<T>
get
- get<T>(endpoints: Endpoints, options?: OptionsOfJSONResponseBody): Promise<T>
-
Type parameters
Parameters
-
-
Optional options: OptionsOfJSONResponseBody
Returns Promise<T>
Private joinEndpoints
-
Parameters
Returns string
post
- post<T>(endpoints: Endpoints, options?: OptionsOfJSONResponseBody): Promise<T>
-
Type parameters
Parameters
-
-
Optional options: OptionsOfJSONResponseBody
Returns Promise<T>
put
- put<T>(endpoints: Endpoints, options?: OptionsOfJSONResponseBody): Promise<T>
-
Type parameters
Parameters
-
-
Optional options: OptionsOfJSONResponseBody
Returns Promise<T>
request
- request<T>(endpoints: Endpoints, method: HTTPAlias, options?: OptionsOfJSONResponseBody): Promise<T>
-
Type parameters
Parameters
-
-
method: HTTPAlias
-
Optional options: OptionsOfJSONResponseBody
Returns Promise<T>
HTTP federation client. Wrapper around the Got library, with additional options set.