File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * This array represents all possible methods for a request.
3+ */
4+ export const method = [
5+ 'GET' ,
6+ 'HEAD' ,
7+ 'POST' ,
8+ 'PUT' ,
9+ 'DELETE' ,
10+ 'CONNECT' ,
11+ 'OPTIONS' ,
12+ 'TRACE' ,
13+ 'PATCH'
14+ ] as const ;
15+
16+ /**
17+ * This type represents possible methods
18+ */
19+ export type Method = typeof method [ number ] ;
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export class Socket {
4949 return ;
5050 }
5151
52- const text = new TextDecoder ( ) . decode ( value , { stream : true } ) ;
52+ const text = new TextDecoder ( ) . decode ( value , { stream : true } ) ;
5353 leftover += text ;
5454
5555 if ( ! headerParsed ) {
Original file line number Diff line number Diff line change 1+ import { Method } from './method.ts' ;
2+
13export interface SocketInitOptions {
2- method ? : 'GET' | 'PUT' | 'POST' ,
4+ method ? : Method ,
35 headers : Record < string , string >
46}
You can’t perform that action at this time.
0 commit comments