Last updated

API / geotoolkit / http / AbstractHttpService / AbstractHttpService

Namespace: AbstractHttpService

http.AbstractHttpService.AbstractHttpService

Table of contents

Type Aliases

Contents

Type Aliases

Options

Ƭ Options: Object

default options

Type declaration

NameTypeDescription
cancel?Cancel | DeprecatedCancelCallbackCancellation token. Type of function to receive cancel token is deprecated since 4.0
headers?Record<string, string>custom headers to be sent
onprogress?(progressObject: { loaded: number ; total: number }) => voida function to be executed to handle progress
timeout?numberA timeout in milliseconds to abort a request. If set to 0 (default) a timeout is not created.
transformrequest?(request: RequestOptions) => anya function executed before requests
transformresponse?(response: any) => anya function executed after response
withcredentials?booleancredential options

RequestMethods

Ƭ RequestMethods: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH"


RequestOptions

Ƭ RequestOptions: Options & { baseurl?: string ; data?: any ; method?: RequestMethods | Lowercase<RequestMethods> ; params?: Record<string, any> ; responsetype?: RequestResponse ; url?: string }

options all options keys are case insensitive


RequestResponse

Ƭ RequestResponse: "" | "arraybuffer" | "blob" | "document" | "json" | "text"

Define request response type