boa框架开发手册v5.2

HTTP配置

config.php

'HTTP' => [
	//配置项
],

HTTP配置

配置项默认值类型说明
drivercurlstringHTTP驱动,可选值:curl, socket

curl驱动

配置项默认值类型说明
ssl0intSSL连接;0=不使用,1=单向认证,2=双向认证   CA证书
proxystringHTTP代理,格式:IP:端口
posttypeformstringPOST请求类型,可选值:form, json, xml
mimetypeapplication/x-www-form-urlencodedstringPOST请求头Content-type,一般无需手动设置
timeout_connect15int请求连接超时(秒)
timeout_execute0int请求执行超时(秒),0=默认
header[]array附加请求头
option[]arraycurl附加选项

socket驱动

配置项默认值类型说明
ssl0intSSL连接;0=关闭,1=开启
openssl_get_cert_locations()检索可用证书位置
proxystringHTTP代理,格式:IP:端口
posttypeformstringPOST请求类型,可选值:form, json, xml
mimetypeapplication/x-www-form-urlencodedstringPOST请求头Content-type,一般无需手动设置
persistfalsebool是否打开持久连接
timeout_connect15int请求连接超时(秒)
timeout_execute0int请求执行超时(秒),0=默认
header[]array附加请求头