mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
feat(types): update @lune/net types to reflect buffer support
This commit is contained in:
parent
746b1cc271
commit
185fb6ae66
1 changed files with 5 additions and 5 deletions
|
@ -36,7 +36,7 @@ export type FetchParamsOptions = {
|
||||||
export type FetchParams = {
|
export type FetchParams = {
|
||||||
url: string,
|
url: string,
|
||||||
method: HttpMethod?,
|
method: HttpMethod?,
|
||||||
body: string?,
|
body: (string | buffer)?,
|
||||||
query: HttpQueryMap?,
|
query: HttpQueryMap?,
|
||||||
headers: HttpHeaderMap?,
|
headers: HttpHeaderMap?,
|
||||||
options: FetchParamsOptions?,
|
options: FetchParamsOptions?,
|
||||||
|
@ -61,7 +61,7 @@ export type FetchResponse = {
|
||||||
statusCode: number,
|
statusCode: number,
|
||||||
statusMessage: string,
|
statusMessage: string,
|
||||||
headers: HttpHeaderMap,
|
headers: HttpHeaderMap,
|
||||||
body: string,
|
body: (string | buffer)?,
|
||||||
}
|
}
|
||||||
|
|
||||||
--[=[
|
--[=[
|
||||||
|
@ -83,7 +83,7 @@ export type ServeRequest = {
|
||||||
query: { [string]: string? },
|
query: { [string]: string? },
|
||||||
method: HttpMethod,
|
method: HttpMethod,
|
||||||
headers: { [string]: string },
|
headers: { [string]: string },
|
||||||
body: string,
|
body: (string | buffer)?,
|
||||||
}
|
}
|
||||||
|
|
||||||
--[=[
|
--[=[
|
||||||
|
@ -101,7 +101,7 @@ export type ServeRequest = {
|
||||||
export type ServeResponse = {
|
export type ServeResponse = {
|
||||||
status: number?,
|
status: number?,
|
||||||
headers: { [string]: string }?,
|
headers: { [string]: string }?,
|
||||||
body: string?,
|
body: (string | buffer)?,
|
||||||
}
|
}
|
||||||
|
|
||||||
type ServeHttpHandler = (request: ServeRequest) -> string | ServeResponse
|
type ServeHttpHandler = (request: ServeRequest) -> string | ServeResponse
|
||||||
|
@ -158,7 +158,7 @@ export type ServeHandle = {
|
||||||
export type WebSocket = {
|
export type WebSocket = {
|
||||||
closeCode: number?,
|
closeCode: number?,
|
||||||
close: (code: number?) -> (),
|
close: (code: number?) -> (),
|
||||||
send: (message: string, asBinaryMessage: boolean?) -> (),
|
send: (message: (string | buffer)?, asBinaryMessage: boolean?) -> (),
|
||||||
next: () -> string?,
|
next: () -> string?,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue