import HttpDjangoFileRequest from 'ievv_jsbase/lib/http/HttpDjangoFileRequest'
HttpDjangoFileRequest
Extends:
Extends HttpFileRequest with automatic handling of the Django csrftoken.
Constructor Summary
Public Constructor | ||
public |
constructor(args: *) |
Member Summary
Public Members | ||
public get |
Returns the value of the |
Method Summary
Public Methods | ||
public |
setDefaultRequestHeaders(method: *) Ensures the csrftoken cookie value is automatically set in the
|
Inherited Summary
From class HttpRequest | ||
public get |
Get the parsed URL of the request. |
|
public |
request: * |
|
public |
|
|
public |
deepCopy(): * Create a deep copy of this HttpRequest object. |
|
public |
get(data: *): * Shortcut for |
|
public |
head(data: *): * Shortcut for |
|
public |
httpdelete(data: *): * Shortcut for |
|
public |
makeRequestBody(data: *): * Make request body from the provided data. |
|
public |
Creates a HttpResponse. |
|
public |
patch(data: *): * Shortcut for |
|
public |
post(data: *): * Shortcut for |
|
public |
put(data: *): * Shortcut for |
|
public |
Send the request. |
|
public |
setDefaultRequestHeaders(method: *) Set default request headers. |
|
public |
setRequestHeader(header: *, value: *) Set a request header. |
|
public |
setTreatRedirectResponseAsError(treatRedirectResponseAsError: bool) Set how we treat 3xx responses. |
|
public |
Set the URL of the request. |
From class HttpFileRequest | ||
public |
Overridden to return the response as a HttpFileResponse instead of a HttpResponse. |
|
public |
setDefaultRequestHeaders(method: *) Overridden to ensure we send the correct content-type header for file requests. |
Public Constructors
public constructor(args: *) source
Override:
HttpRequest#constructorParams:
Name | Type | Attribute | Description |
args | * | Same args as for HttpResponse |
Public Members
Public Methods
public setDefaultRequestHeaders(method: *) source
Ensures the csrftoken cookie value is automatically set in the
X-CSRFToken
header for all request except GET and HEAD.
Params:
Name | Type | Attribute | Description |
method | * | See HttpRequest. |