From ccdcc033cbfaca5de39c1591aa77d6c42897bfeb Mon Sep 17 00:00:00 2001 From: James Jones Date: Fri, 12 Sep 2014 12:15:36 -0400 Subject: [PATCH] Added support for a ignoreSSLIssues parameter on dynamic methods using to the underlying http-builder support for it. Registers a scheme using the ignoreSSLIssues() function on the client rather than via SimpleHTTPBuilderSSLHelper.groovy --- RestGrailsPlugin.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RestGrailsPlugin.groovy b/RestGrailsPlugin.groovy index 30d9922..e299394 100644 --- a/RestGrailsPlugin.groovy +++ b/RestGrailsPlugin.groovy @@ -96,6 +96,7 @@ class RestGrailsPlugin { private makeClient(Class klass, Map params, application) { def client + def ignoreSSLIssues = (params.ignoreSSLIssues)?params.remove("ignoreSSLIssues"):false if (klass == AsyncHTTPBuilder) { client = makeAsyncClient(klass, params) @@ -104,7 +105,7 @@ class RestGrailsPlugin { } if (HTTPBuilderSSLConstants.HTTPS == client.uri.toURL().protocol) { - addSSLSupport(client, application) + (ignoreSSLIssues)?client.ignoreSSLIssues():addSSLSupport(client, application) } return client