The structure of an httpResource
request which will be sent to the backend.
url
string
URL of the request.
This URL should not include query parameters. Instead, specify query parameters through the
params
field.
method
string | undefined
HTTP method of the request, which defaults to GET if not specified.
body
unknown
Body to send with the request, if there is one.
If no Content-Type header is specified by the user, Angular will attempt to set one based on
the type of body
.
params
HttpParams | Record<string, string | number | boolean | readonly (string | number | boolean)[]> | undefined
Dictionary of query parameters which will be appeneded to the request URL.
headers
HttpHeaders | Record<string, string | readonly string[]> | undefined
Dictionary of headers to include with the outgoing request.
reportProgress
boolean | undefined
If true
, progress events will be enabled for the request and delivered through the
HttpResource.progress
signal.
withCredentials
boolean | undefined
Specifies whether the withCredentials
flag should be set on the outgoing request.
This flag causes the browser to send cookies and other authentication information along with the request.
transferCache
boolean | { includeHeaders?: string[] | undefined; } | undefined
Configures the server-side rendering transfer cache for this request.
See the documentation on the transfer cache for more information.