ftp works but it blocks the thread

This commit is contained in:
ading2210 2024-03-17 17:50:58 -04:00
parent 0a5ace96fb
commit 2a072ecee0
12 changed files with 165 additions and 184 deletions

View file

@ -97,9 +97,15 @@ Most of the standard Fetch API's features are supported, with the exception of:
- Sending credentials/cookies automatically
- Caching
The response may contain multiple HTTP headers with the same name, which the `Headers` object isn't able to properly represent. If this matters to you, use `response.raw_headers`, which is an array of key value pairs, instead of `response.headers`. There is support for streaming the response body using a `ReadableStream`, as well as canceling requests using an `AbortSignal`.
The response may contain multiple HTTP headers with the same name, which the `Headers` object isn't able to properly represent. If this matters to you, use `response.raw_headers`, which is an array of key value pairs, instead of `response.headers`. There is support for streaming the response body using a `ReadableStream`, as well as canceling requests using an `AbortSignal`. All requests made using this method share the same connection pool, which has a limit of 50 active TCP connections.
Also note that there is a hard limit of 50 active TCP connections due to emscripten limitations.
### Creating New HTTP Sessions:
To create new sessions for HTTP requests, use the `libcurl.HTTPSession` class. The constructor for this class takes the following arguments:
- `options` - An optional object with various settings.
The valid HTTP session settings are:
- `enable_cookies` - A boolean which indicate whether or not cookies should be persisted within the session.
- `cookie_jar` - A blob containing the data in the cookie jar file. This should have been exported from a previous session.
### Creating WebSocket Connections:
To use WebSockets, create a `libcurl.CurlWebSocket` object, which takes the following arguments: