Note that there are some explanatory texts on larger screens.

plurals
  1. POgroovy HTTP Builder not returning results
    primarykey
    data
    text
    <p>I have the following code in groovy</p> <pre><code>HTTPBuilder http = new HTTPBuilder("https://ronna-afghan.harmonieweb.org/_layouts/searchrss.aspx") http.request(Method.GET, groovyx.net.http.ContentType.XML) { // set username and password for basic authentication // set username and password for basic auth //http.auth.basic(ConfigurationHolder.config.passportService.userName, // ConfigurationHolder.config.passportService.password) headers.'User-Agent' = 'Mozilla/5.0' uri.query = [k:'execution'] // response handler for a success response code: response.success = {resp, xml -&gt; println resp.statusLine log.debug "response status: ${resp.statusLine}" log.debug xml.toString() } // handler for any failure status code: response.failure = {resp -&gt; log.error " ${resp.statusLine.statusCode} : ${resp.statusLine.reasonPhrase}" } } </code></pre> <p>when I run the code, it doesn't give me the rss feed which I'm suppose to get </p> <p>When I have the same code in java </p> <pre><code>try { // Create a URLConnection object for a URL URL oracle = new URL( "https://ronna-afghan.harmonieweb.org/_layouts/srchrss.aspx?k=execution&amp;count=1&amp;format=rss"); URLConnection yc = oracle.openConnection(); BufferedReader in = new BufferedReader(new InputStreamReader( yc.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); in.close(); } } catch (Exception e) { e.printStackTrace(); } } </code></pre> <p>it returns the xml Rss. I can't figure what the issue might be. Everything looks okay to me in the groovy code and also the Http return code is 200.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload