remove unused func
This commit is contained in:
parent
60b819b9a4
commit
ee384eb4bc
8
mod.ts
8
mod.ts
|
@ -328,18 +328,12 @@ export class RouteRequest {
|
|||
this.headers = request.headers;
|
||||
this.method = request.method as HTTPMethod;
|
||||
this.pathParams = {};
|
||||
this.queryParams = this.paramsToObject(new URL(url).searchParams.entries());
|
||||
this.queryParams = Object.fromEntries(new URL(url).searchParams.entries());
|
||||
this.remoteIpAddr = "hostname" in conn.remoteAddr
|
||||
? conn.remoteAddr["hostname"]
|
||||
: "127.0.0.1";
|
||||
}
|
||||
|
||||
private paramsToObject(
|
||||
entries: IterableIterator<[string, string]>,
|
||||
): { [key: string]: string } {
|
||||
return Object.fromEntries(entries);
|
||||
}
|
||||
|
||||
header(name: string): unknown {
|
||||
const matchingHeader = Array.from(this.headers.keys()).find((headerName) =>
|
||||
headerName === name
|
||||
|
|
Reference in New Issue
Block a user