http请求类
更多...
http请求类
在文件 BuiltinObjects.x 第 703 行定义.
◆ HttpRequest()
◆ available() [1/2]
long available |
( |
bool |
wait | ) |
|
|
package |
◆ available() [2/2]
◆ finalize()
◆ get() [1/2]
bool get |
( |
String |
url, |
|
|
int |
timeout, |
|
|
bool |
bssh |
|
) |
| |
|
package |
执行get操作
- 参数
-
url | 地址 |
timeout | 超时限定 |
bssh | 安全连接 |
- 返回
- 执行结果
◆ get() [2/2]
◆ getLength()
◆ getResponseCode() [1/2]
◆ getResponseCode() [2/2]
◆ post() [1/2]
bool post |
( |
String |
url, |
|
|
int |
timeout, |
|
|
bool |
bssh |
|
) |
| |
|
package |
执行post操作
- 参数
-
url | 地址 |
timeout | 超时限定 |
bssh | 安全连接 |
- 返回
- 执行结果
◆ post() [2/2]
◆ putField() [1/5]
bool putField |
( |
String |
name, |
|
|
String |
aliasName, |
|
|
byte [] |
data |
|
) |
| |
|
package |
添加数据段
- 参数
-
name | 字段名 |
aliasName | 别名 |
data | 数据 |
- 返回
- 执行结果
◆ putField() [2/5]
添加数据段
- 参数
-
name | 字段名 |
aliasName | 别名 |
path | 文件路径 |
- 返回
- 执行结果
◆ putField() [3/5]
◆ putField() [4/5]
bool putField |
( |
String |
, |
|
|
|
byte[], |
|
|
int |
, |
|
|
int |
|
|
) |
| |
◆ putField() [5/5]
bool putField |
( |
String |
, |
|
|
|
String |
|
) |
| |
◆ putFormField() [1/4]
bool putFormField |
( |
String |
, |
|
|
|
String |
|
) |
| |
◆ putFormField() [2/4]
bool putFormField |
( |
String |
, |
|
|
|
String, |
|
|
|
String, |
|
|
|
byte[] |
|
) |
| |
◆ putFormField() [3/4]
bool putFormField |
( |
String |
, |
|
|
|
String, |
|
|
|
String, |
|
|
|
Stream |
|
) |
| |
◆ putFormField() [4/4]
bool putFormField |
( |
String |
, |
|
|
|
String, |
|
|
|
String, |
|
|
|
String |
|
) |
| |
◆ putHeader() [1/2]
bool putHeader |
( |
String |
header | ) |
|
|
package |
设置http请求的header
- 参数
-
- 返回
- 执行结果
◆ putHeader() [2/2]
◆ read()
int read |
( |
byte |
[], |
|
|
int |
, |
|
|
int |
|
|
) |
| |
◆ readData()
long readData |
( |
buye [] |
buffer, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| |
|
package |
读取相应数据
- 参数
-
buffer | 缓冲区 |
offset | 缓冲区的偏移量 |
length | 待读取长度 |
- 返回
- 成功读取的长度
◆ removeField() [1/2]
bool removeField |
( |
String |
name | ) |
|
|
package |
◆ removeField() [2/2]
◆ removeHeader() [1/2]
bool removeHeader |
( |
String |
header | ) |
|
|
package |
移除http请求的header
- 参数
-
- 返回
- 执行结果
◆ removeHeader() [2/2]
◆ reset() [1/2]
◆ reset() [2/2]
◆ setCookie() [1/2]
bool setCookie |
( |
String |
cookie | ) |
|
|
package |
◆ setCookie() [2/2]
◆ setCookieInputFile() [1/2]
bool setCookieInputFile |
( |
String |
filepath | ) |
|
|
package |
◆ setCookieInputFile() [2/2]
bool setCookieInputFile |
( |
String |
| ) |
|
◆ setCookieOutputFile() [1/2]
bool setCookieOutputFile |
( |
String |
filepath | ) |
|
|
package |
◆ setCookieOutputFile() [2/2]
bool setCookieOutputFile |
( |
String |
| ) |
|
◆ setProxy() [1/2]
设置代理
- 参数
-
url | 代理服务器地址 |
port | 代理服务器端口 |
optionType | 代理类型
PT_HTTP = 0, PT_HTTP_10 = 1, PT_SOCKS4 = 4, PT_SOCKS5 = 5, PT_SOCKS4A = 6, PT_SOCKS5_HOSTNAME = 7, |
username | 用户名 |
password | 密码 |
- 返回
- 执行结果
◆ setProxy() [2/2]
bool setProxy |
( |
String |
, |
|
|
int |
, |
|
|
int |
, |
|
|
|
String, |
|
|
|
String |
|
) |
| |
◆ setUserAgent() [1/2]
bool setUserAgent |
( |
String |
agent | ) |
|
|
package |
◆ setUserAgent() [2/2]
◆ PROXY_HTTP
◆ PROXY_HTTP_10
◆ PROXY_HTTP_SOCKS5_HOSTNAME
const int PROXY_HTTP_SOCKS5_HOSTNAME |
|
staticpackage |
◆ PROXY_SOCKS4
◆ PROXY_SOCKS4A
◆ PROXY_SOCKS5