diff --git a/json_rpc/clients/httpclient.nim b/json_rpc/clients/httpclient.nim index 097375c..1d136c1 100644 --- a/json_rpc/clients/httpclient.nim +++ b/json_rpc/clients/httpclient.nim @@ -41,9 +41,15 @@ const proc new( T: type RpcHttpClient, maxBodySize = MaxHttpRequestSize, secure = false, getHeaders: GetJsonRpcRequestHeaders = nil, flags: HttpClientFlags = {}): T = + + var moreFlags: HttpClientFlags + if secure: + moreFlags.incl HttpClientFlag.NoVerifyHost + moreFlags.incl HttpClientFlag.NoVerifyServerName + T( maxBodySize: maxBodySize, - httpSession: HttpSessionRef.new(flags = flags), + httpSession: HttpSessionRef.new(flags = flags + moreFlags), getHeaders: getHeaders ) diff --git a/tests/all.nim b/tests/all.nim index b669d87..feebc94 100644 --- a/tests/all.nim +++ b/tests/all.nim @@ -13,6 +13,7 @@ import testrpcmacro, testethcalls, testhttp, + testhttps, testserverclient, testproxy, testhook,