1

I am exploring using HttpBuilder-NG to perform REST calls. My first attempt simply gives me a groovy.net.http.HttpException with a traceback. No other details. Using the previous HttpBuilder I was able to turn on logging to see what is sent and received.

The code is pretty simple:

    def jiraUrl = 'https://gpdevjira.broadinstitute.org:8443/rest/api/2'
def username = 'releng'
def password = 'releng'


@Test
void testGetIssue() {

    def jira = configure {
        request.uri = jiraUrl
        request.auth.basic username, password
    }

    assert jira

    String text = jira.get(String){
        request.uri.path = "/issue/$testIssue"
    }

    assert text
}
Erik Husby
  • 21
  • 3
  • Looks like you are using the core client implementation. I don't think that there is much logging in there. In general the logging will be whatever is provided by the client implementation. I will create an issue to provide better logging overall but especially in the plain Java implementation. – cjstehno May 11 '17 at 15:38
  • Also, try ignoring SSL issues (https://http-builder-ng.github.io/http-builder-ng/asciidoc/html5/#_ignoring_ssl_issues) as a test to ensure its not related to that. – cjstehno May 11 '17 at 15:42
  • Sorry, one more.. why are you passing the configed HttpBuilder into the path? – cjstehno May 11 '17 at 15:44
  • Coding mistake to use the testissue variable for two different purposes! I was putting a quick test program together. Corrected the variable name but still have the same problem. – Erik Husby May 11 '17 at 19:15
  • The old HttpBuilder used the Apache client. If you are looking for something similar you should use the Apache client implementation of HttpBuilder-NG. The logging will then be what you had before. – cjstehno May 11 '17 at 22:02

1 Answers1

0

I think that the question has been answered with the suggestion to use the Apache client implementation of HttpBuilder-NG

Erik Husby
  • 21
  • 3
  • FYI: In the next release (0.17.0) similar logging will be available for the core Java client as well. – cjstehno May 22 '17 at 12:48