DefaultHttpClient class

를 사용하는 HTTP 클라이언트입니다 node-fetch.

메서드

fetch(string, CommonRequestInit)

를 사용하여 node-fetch 요청을 수행합니다.

prepareRequest(WebResourceLike)

제공된 웹 리소스를 기반으로 요청을 준비합니다.

processRequest(HttpOperationResponse)

HTTP 응답을 처리합니다.

sendRequest(WebResourceLike)

실행 가능한 최소 오류 처리 및 추상 메서드를 실행하는 논리를 제공합니다.

메서드 세부 정보

fetch(string, CommonRequestInit)

를 사용하여 node-fetch 요청을 수행합니다.

function fetch(input: string, init?: CommonRequestInit): Promise<CommonResponse>

매개 변수

input

string

반환

Promise<CommonResponse>

prepareRequest(WebResourceLike)

제공된 웹 리소스를 기반으로 요청을 준비합니다.

function prepareRequest(httpRequest: WebResourceLike): Promise<Partial<RequestInit>>

매개 변수

httpRequest
WebResourceLike

반환

Promise<Partial<RequestInit>>

processRequest(HttpOperationResponse)

HTTP 응답을 처리합니다.

function processRequest(_operationResponse: HttpOperationResponse): Promise<void>

매개 변수

_operationResponse
HttpOperationResponse

반환

Promise<void>

sendRequest(WebResourceLike)

실행 가능한 최소 오류 처리 및 추상 메서드를 실행하는 논리를 제공합니다.

function sendRequest(httpRequest: WebResourceLike): Promise<HttpOperationResponse>

매개 변수

httpRequest
WebResourceLike

나가는 HTTP 요청을 나타내는 개체입니다.

반환

들어오는 HTTP 응답을 나타내는 개체입니다.