import { Request } from "https://deno.land/x/deno_koa@v1.0.4/mod.ts";
Properties
Return request header.
Return request header, alias as request.header
Parse the "Host" header field host and support X-Forwarded-Host when a proxy is enabled.
Parse the "Host" header field hostname and support X-Forwarded-Host when a proxy is enabled.
Return request's remote address
When app.proxy
is true
, parse
the "X-Forwarded-For" ip address list and return the first one
When app.proxy
is true
, parse
the "X-Forwarded-For" ip address list.
For example if the value were "client, proxy1, proxy2"
you would receive the array ["client", "proxy1", "proxy2"]
where "proxy2" is the furthest down-stream.
Return the request conn.
Check if the request is stale, aka "Last-Modified" and / or the "ETag" for the resource has changed.
Get WHATWG parsed URL object.
Methods
Return request header. If the header is not set, will return an empty string.
The Referrer
header field is special-cased, both Referrer
and
Referer
are interchangeable.
Examples:
this.get('Content-Type');
// => "text/plain"
this.get('content-type');
// => "text/plain"
this.get('Something');
// => ''
Inspect implementation.
Check whether the response is one of the listed types.
Return JSON representation.