ygrek / ocurl

OCaml bindings to libcurl
https://ygrek.org/p/ocurl
MIT License
60 stars 32 forks source link

Add CURLOPT_PREREQFUNCTION #64

Closed apeschar closed 1 year ago

apeschar commented 1 year ago

This function gets called by libcurl after a connection has been established or a connection has been reused (including any SSL handshaking), but before any request is actually made on the connection. For example, for HTTP, this callback is called once a connection has been established to the server, but before a GET/HEAD/POST/etc request has been sent.

See: https://curl.se/libcurl/c/CURLOPT_PREREQFUNCTION.html

This can be used, for example, to make sure that connections/requests to the local network are blocked.

ygrek commented 1 year ago

Thanks!