HOW-TO: set custom socket options (eg -nohostverify) when us

Posted by Peter Judge on 23-Nov-2015 08:26

Following my session at the EMEA PUG Challenge on the new HTTP Client, I've got a couple of questions via email on how to override options on the underlying ABL socket (for example, specifying the -nohostverify option). I thought I'd post a how-to here in case it comes up again.

Usually when you create a client using all the default options it looks something like this

def var oClient as IHttpClient.
def var oReq as IHttpRequest.
def var oResp as IHttpResponse.

oClient = ClientBuilder:Build()

oReq = RequestBuilder:Get('')

oResp = oClient:Execute(oReq).

The place to provide these socket overrides is in the ClientBuilder and the ClientLibraryBuilder. I've attached some sample code that will shows 3 options for specifying overrides (the -nohostverify option in particular).

You can see API doc for the HTTP Client at

To verify the connection parameters actually used, enable logging as follows:

log-manager:logfile-name = session:temp-dir + 'log-manager.log'.
log-manager:logging-level = 5.

The important part is the logging level of >= 5.

You'll see a line similar to

[15/08/14@13:48:22.473-0400] P-010384 T-008916 1 4GL SOCKET         CONNECT: -H -S 443 -ssl

All Replies

Posted by Tammy Hall on 24-Nov-2015 08:45

Thanks for sharing!

This thread is closed