more_horiz
@angular/common/httpcode
HttpClientCommonOptions
interface
stablesince v22.0
Common options for HttpClient requests.
On this page
API
interface HttpClientCommonOptions extends Omit<HttpRequestOptions, 'headers' | 'params'> { headers?: HttpHeaders | { [header: string]: string | string[]; } | undefined; observe?: "body" | "events" | "response" | undefined; params?: HttpParams | { [param: string]: string | number | boolean | readonly (string | number | boolean)[]; } | undefined; override context?: HttpContext | undefined; override reportProgress?: boolean | undefined; override reportUploadProgress?: boolean | undefined; override reportDownloadProgress?: boolean | undefined; override responseType?: HttpResponseType | undefined; override withCredentials?: boolean | undefined; override credentials?: RequestCredentials | undefined; override keepalive?: boolean | undefined; override priority?: RequestPriority | undefined; override cache?: RequestCache | undefined; override mode?: RequestMode | undefined; override redirect?: RequestRedirect | undefined; override referrer?: string | undefined; override integrity?: string | undefined; override referrerPolicy?: ReferrerPolicy | undefined; override transferCache?: HttpTransferCacheRequestOptions | undefined; override timeout?: number | undefined;}
headers
HttpHeaders | { [header: string]: string | string[]; } | undefinedobserve
"body" | "events" | "response" | undefinedparams
HttpParams | { [param: string]: string | number | boolean | readonly (string | number | boolean)[]; } | undefinedcontext
HttpContext | undefinedreportUploadProgress
boolean | undefinedWhen set to true a request emited against the FetchBackend will throw an error.
reportDownloadProgress
boolean | undefinedresponseType
HttpResponseType | undefinedwithCredentials
boolean | undefinedcredentials
RequestCredentials | undefinedkeepalive
boolean | undefinedpriority
RequestPriority | undefinedcache
RequestCache | undefinedmode
RequestMode | undefinedredirect
RequestRedirect | undefinedreferrer
string | undefinedintegrity
string | undefinedreferrerPolicy
ReferrerPolicy | undefinedtransferCache
HttpTransferCacheRequestOptions | undefinedThis property accepts either a boolean to enable/disable transferring cache for eligible
requests performed using HttpClient, or an object, which allows to configure cache
parameters, such as which headers should be included (no headers are included by default).
Setting this property will override the options passed to provideClientHydration() for this
particular request
timeout
number | undefinedJump to details