Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5843869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:12:52+00:00 2026-05-22T12:12:52+00:00

I have strange problem with Groovy and HttpBuilder library. First to note, I’m fresh

  • 0

I have strange problem with Groovy and HttpBuilder library. First to note, I’m fresh to Groovy.

I’ve based my code on tutorial. It simply loads the list of files from HTTP server. The code was working yesterday, today (after workspace build) not.

The problem is:

Caught: groovy.lang.MissingMethodException: No signature of method: groovyx.net.http.HTTPBuilder.request() is applicable for argument types: (groovyx.net.http.Method, groovyx.net.http.ContentType, pl.linfo.groovy.samples.HttpTest$_main_closure1)
Possible solutions: request(groovyx.net.http.Method, groovy.lang.Closure)

The code is:

def http = new HTTPBuilder( 'http://nbp.pl/Kursy/xml/dir.txt' )
    http.request( GET, TEXT ) { 
        response.success = { resp, reader ->
            println "${resp.statusLine}"
            files = reader.text.split ('\r\n')
        }
        response.'404' = {
            println "Not found!"
            return
        }
    };

The running environment is Eclipse 3.6

I suppose the problem is groovy compilation issue, the groovy code fragment after recompile no longer matching Closure. However, as new to Groovy I have problem to find out what’s going on so please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:12:52+00:00Added an answer on May 22, 2026 at 12:12 pm

    This has to be some problem with the Eclipse Groovy plugin. The code you posted works well for me when run using the groovy interpreter.

    $ cat hbuildertest.groovy 
    @Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.1' )
    import groovyx.net.http.*
    import static groovyx.net.http.ContentType.*
    import static groovyx.net.http.Method.*
    
    def http = new HTTPBuilder( 'http://nbp.pl/Kursy/xml/dir.txt' )
        http.request( GET, TEXT ) { 
            response.success = { resp, reader ->
                println "${resp.statusLine}"
                files = reader.text.split ('\r\n')
            }
            response.'404' = {
                println "Not found!"
                return
            }
        };
    
    
    $ groovy hbuildertest.groovy 
    May 19, 2011 12:59:08 AM groovyx.net.http.ParserRegistry getCharset
    WARNING: Could not find charset in response
    HTTP/1.1 200 OK
    $ 
    

    Also the method with signature:

    public Object request( Method m, Object contentType, Closure configClosure ) 
                throws ClientProtocolException, IOException 
    

    exists in groovyx.net.http.HTTPBuilder class since at least 0.3.0 version of the library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange problem when using Entity Framework code first. When I return
I have a strange problem regarding null pointer exception. I'm posting the problematic code
I have a strange problem with Jquery Ajax with the following code. Situation 1:
I have strange problem with XUL layouts. My current code: <xul:vbox> <xul:hbox> .. some
I have strange problem with sharepoint and ajax functionality. We have an UpdatePanel placed
i have strange problem doing reporting: i have numerous clients with different issued invoices.
We have very strange problem, one of our applications is continually querying server by
I have a strange problem with mod_rewrite, the rules that are relevant here are:
I have a strange problem with VS2008. My solution has 8 projects (all c#)
I have a strange problem with lxml when using the deployed version of my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.