FSharp.Data's HTTP utilities expose a customizeHttpRequest parameter. It receives the underlying HttpWebRequest and returns the request to use:

open System.Net
open FSharp.Data

let body =
    Http.RequestString(
        "https://example.net/data",
        customizeHttpRequest = fun request ->
            request.Proxy <- WebProxy("http://proxy.example.net:8080")
            request
    )

The callback sets the proxy on this request. For this public HTTPS request, an unauthenticated candidate from the HTTP proxy list can replace the example endpoint when that route is permitted. Its last expression returns the request object, matching the documented HttpWebRequest -> HttpWebRequest function type.

The same customization parameter is available on the corresponding detailed and asynchronous HTTP methods. Keep the callback with the call or reusable helper that needs this route. The rest of the application can continue using its own request configuration.

འབྲེལ་བའི་རྩོམ་ཡིག