[erlang-questions] How to unset or remove the proxy option on Erlang httpc client default profile once set?

chris casilli christopher.casilli@REDACTED
Tue Mar 5 18:49:23 CET 2019


I’m trying to figure out how to remove the proxy option settings once they’ve been set.

The proxy originally is not set and shown as undefined:
I'm able to set the proxy option without problem:
httpc:set_options([{proxy, {{"www-proxy.mycompany.com", 8000},["localhost"]}}]).
How do you unset the proxy back not undefined (or no proxy) when it is not needed? I tried:

httpc:set_options([{proxy,{undefined, []}}]).
But it throws an exception:
** exception throw: {error,{bad_option,proxy,{undefined,[]}}}
     in function  httpc:bad_option/2 (httpc.erl, line 1102)
     in call from httpc:validate_options/2 (httpc.erl, line 932)
     in call from httpc:validate_options/1 (httpc.erl, line 922)
     in call from httpc:set_options/2 (httpc.erl, line 236)
What am I doing wrong?

Chris Casilli

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190305/80efebfe/attachment.htm>

More information about the erlang-questions mailing list