You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
936 B
45 lines
936 B
import { ServerRequest } from '../../external/http.ts'
|
|
import {HTTPResponse} from './HTTPResponse.ts'
|
|
import SessionInterface from '../session/SessionInterface.ts'
|
|
import ActivatedRoute from '../routing/ActivatedRoute.ts'
|
|
|
|
/**
|
|
* Base type representing an HTTP protocol version.
|
|
*/
|
|
export interface HTTPProtocol {
|
|
string: string,
|
|
major: number,
|
|
minor: number,
|
|
}
|
|
|
|
/**
|
|
* Base type representing a remote host.
|
|
*/
|
|
export interface RemoteHost {
|
|
hostname: string,
|
|
port: number,
|
|
transport: string,
|
|
}
|
|
|
|
/**
|
|
* Base type for an incoming HTTP request.
|
|
*/
|
|
export interface HTTPRequest {
|
|
url: string
|
|
method: string
|
|
protocol: HTTPProtocol
|
|
headers: Headers
|
|
connection: Deno.Conn
|
|
response: HTTPResponse
|
|
to_native: ServerRequest
|
|
|
|
remote: RemoteHost
|
|
body: any
|
|
query: any
|
|
hostname: string | undefined
|
|
secure: boolean
|
|
|
|
session: SessionInterface,
|
|
route?: ActivatedRoute,
|
|
}
|