HttpRequest
¶
文档版本:1.21.60.21
HttpRequest
类。script_api.minecraft/server-net.httprequest.description
属性¶
body
body
:string
- script_api.minecraft/server-net.httprequest.body.description
headers
headers
:HttpHeader[]
- script_api.minecraft/server-net.httprequest.headers.description
method
method
:HttpRequestMethod
- script_api.minecraft/server-net.httprequest.method.description
timeout
timeout
:uint32
- script_api.minecraft/server-net.httprequest.timeout.description
uri
uri
:string
- script_api.minecraft/server-net.httprequest.uri.description
方法¶
addHeader
script_api.minecraft/server-net.httprequest.addheader.description
key
:string
- script_api.minecraft/server-net.httprequest.addheader.key.description
value
:SecretString
|string
- script_api.minecraft/server-net.httprequest.addheader.value.description
- 返回值:
HttpRequest
- script_api.minecraft/server-net.httprequest.addheader.return
constructor
script_api.minecraft/server-net.httprequest.constructor.description
uri
:string
- script_api.minecraft/server-net.httprequest.constructor.uri.description
- 返回值:
HttpRequest
- script_api.minecraft/server-net.httprequest.constructor.return
setBody
script_api.minecraft/server-net.httprequest.setbody.description
body
:string
- script_api.minecraft/server-net.httprequest.setbody.body.description
- 返回值:
HttpRequest
- script_api.minecraft/server-net.httprequest.setbody.return
setHeaders
script_api.minecraft/server-net.httprequest.setheaders.description
headers
:HttpHeader[]
- script_api.minecraft/server-net.httprequest.setheaders.headers.description
- 返回值:
HttpRequest
- script_api.minecraft/server-net.httprequest.setheaders.return
setMethod
script_api.minecraft/server-net.httprequest.setmethod.description
- 返回值:
HttpRequest
- script_api.minecraft/server-net.httprequest.setmethod.return
setTimeout
script_api.minecraft/server-net.httprequest.settimeout.description
timeout
:uint32
∈[0
, +∞]- script_api.minecraft/server-net.httprequest.settimeout.timeout.description
- 返回值:
HttpRequest
- script_api.minecraft/server-net.httprequest.settimeout.return