Interface: StoneIncomingEvent
Interface: StoneIncomingEvent
Represents a Stone incoming event. Used only in StoneJS.
Extends
IncomingEvent
Properties
acceptsTypes()
acceptsTypes: (...types) => string | boolean;
Parameters
types
...string
[]
Returns
string
| boolean
body?
optional body: unknown;
decodedPathname?
optional decodedPathname: string;
getUri()
getUri: (withDomain) => undefined | string;
Parameters
withDomain
boolean
Returns
undefined
| string
host
host: string;
is()
is: (key, value) => boolean;
Check if the given value is equal to the specified value.
Parameters
key
string
The key to check.
value
unknown
The value to compare against.
Returns
boolean
True if the key's value is equal to the specified value, false otherwise.
Overrides
IncomingEvent.is
isMethod()
isMethod: (method) => boolean;
Parameters
method
Returns
boolean
isSecure?
readonly optional isSecure: boolean;
method
method: HttpMethod;
pathname
pathname: string;
preferredType()
preferredType: (types, defaultType?) => string;
Parameters
types
string
[]
defaultType?
string
Returns
string
query?
optional query: URLSearchParams;
setRouteResolver()
setRouteResolver: <U, V>(resolver) => void;
Type Parameters
U
U
extends IIncomingEvent
V
V
= unknown
Parameters
resolver
() => Route
<U
, V
>
Returns
void
url
url: URL;