Did you know ... Search Documentation:
Predicate open_options/2
 http:open_options(Parts, Options) is nondet[multifile, library(http/http_ssl_plugin)]
Implementation of the multifile hook http:open_options/2 used by library(http/http_open). By default, we use the system trusted root certificate database for validating an SSL certificate.
 http:open_options(+Parts, -Options) is nondet[multifile, library(http/http_open)]
This hook is used by the HTTP client library to define default options based on the the broken-down request-URL. The following example redirects all trafic, except for localhost over a proxy:
:- multifile
    http:open_options/2.

http:open_options(Parts, Options) :-
    option(host(Host), Parts),
    Host \== localhost,
    Options = [proxy('proxy.local', 3128)].

This hook may return multiple solutions. The returned options are combined using merge_options/3 where earlier solutions overrule later solutions.