<commit_before>import groovyx.net.http.HTTPBuilder
import org.apache.commons.io.IOUtils

import static groovyx.net.http.ContentType.TEXT
import static groovyx.net.http.Method.GET

def data
def http = new HTTPBuilder('http://localhost:8080/products')
http.request(GET, TEXT) { req ->
  response.success = { resp, reader ->
    assert resp.status == 200
    println "My response handler got response: ${resp.statusLine}"
    println "Response length: ${resp.headers.'Content-Length'}"
    data = IOUtils.toString(reader)
    assert data.contains("product 1")
  }

  // called only for a 404 (not found) status code:
  response.'404' = { resp ->
    assert false
  }
}
<commit_msg>Try to delay the spring example check<commit_after>import groovyx.net.http.HTTPBuilder
import org.apache.commons.io.IOUtils

import static groovyx.net.http.ContentType.TEXT
import static groovyx.net.http.Method.GET

Thread.sleep(5000)
def data
def http = new HTTPBuilder('http://localhost:8080/products')
http.request(GET, TEXT) { req ->
  response.success = { resp, reader ->
    assert resp.status == 200
    println "My response handler got response: ${resp.statusLine}"
    println "Response length: ${resp.headers.'Content-Length'}"
    data = IOUtils.toString(reader)
    assert data.contains("product 1")
  }

  // called only for a 404 (not found) status code:
  response.'404' = { resp ->
    assert false
  }
}

{'fraction_non_alphanumeric': 0.12508934953538242, 'fraction_numerical': 0.0228734810578985, 'mean_word_length': 3.8780487804878048, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2017942', 'n_tokens_mistral': 461, 'n_tokens_neox': 429, 'n_words': 115}