Constructors
constructor
new HttpRequest<T>( method: HttpMethod, url: string, options?: { body?: T; context?: HttpContext; headers?: | string | HttpHeaders | { [name: string]: string | number | (
string | number)
[] } | Headers; params?: | null | string | HttpParams | { [param: string]: | string | number | boolean | readonly (
string | number | boolean)
[]; }; reportProgress?: boolean; responseType?: HttpResponseType; withCredentials?: boolean; },): HttpRequest<T> Parameters
- method: HttpMethod
- url: string
Optional
options: {
body?: T;
context?: HttpContext;
headers?:
| string
| HttpHeaders
| { [name: string]: string
| number
| (string | number)[] }
| Headers;
params?:
| null
| string
| HttpParams
| {
[param: string]: | string
| number
| boolean
| readonly (string | number | boolean)[];
};
reportProgress?: boolean;
responseType?: HttpResponseType;
withCredentials?: boolean;
}
Properties
Readonly
reportProgress
reportProgress: boolean
Readonly
urlWithParams
urlWithParams: string
Readonly
withCredentials
withCredentials: boolean
Methods
serializeBody
serializeBody(): null | string | ArrayBuffer | Blob | FormData | URLSearchParams Returns null | string | ArrayBuffer | Blob | FormData | URLSearchParams
Examine the body and attempt to infer an appropriate MIME type for it. If no such type can be inferred, this method will return
null
.