Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Added support for a ignoreSSLIssues as a parameter on dynamic methods #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RestGrailsPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class RestGrailsPlugin {

private makeClient(Class klass, Map params, application) {
def client
def ignoreSSLIssues = (params.ignoreSSLIssues)?params.remove("ignoreSSLIssues"):false
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulls out this parameter early

if (klass == AsyncHTTPBuilder) {
client = makeAsyncClient(klass, params)

Expand All @@ -104,7 +105,7 @@ class RestGrailsPlugin {
}

if (HTTPBuilderSSLConstants.HTTPS == client.uri.toURL().protocol) {
addSSLSupport(client, application)
(ignoreSSLIssues)?client.ignoreSSLIssues():addSSLSupport(client, application)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alternatively registers a scheme using the ignoreSSLIssues() function on the client rather than via SimpleHTTPBuilderSSLHelper.groovy object

}

return client
Expand Down