Adds proxy support for HTTPClient

Also fixed a potential infinite loop when connecting to server.
This commit is contained in:
Haoyu Qiu
2021-07-03 13:11:59 +08:00
parent c5ab537617
commit c09ea8d45a
5 changed files with 129 additions and 8 deletions

View File

@@ -173,6 +173,24 @@
Sends the body data raw, as a byte array and does not encode it in any way.
</description>
</method>
<method name="set_http_proxy">
<return type="void" />
<argument index="0" name="host" type="String" />
<argument index="1" name="port" type="int" />
<description>
Sets the proxy server for HTTP requests.
The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
</description>
</method>
<method name="set_https_proxy">
<return type="void" />
<argument index="0" name="host" type="String" />
<argument index="1" name="port" type="int" />
<description>
Sets the proxy server for HTTPS requests.
The proxy server is unset if [code]host[/code] is empty or [code]port[/code] is -1.
</description>
</method>
</methods>
<members>
<member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled" default="false">