Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def obtainTealiumData(String tealiumAccount, String tealiumProfile) {
- def http = new HTTPBuilder("https://visitor-service.tealiumiq.com/datacloudprofiledefinitions/" + tealiumAccount + "/" + tealiumProfile)
- def results = null
- http.request(GET, JSON) {
- headers.'User-Agent' = 'Mozilla/5.0 Ubuntu/8.10 Firefox/3.0.4'
- headers.Accept = 'application/json'
- response.success = { resp, reader ->
- assert resp.statusLine.statusCode == 200
- results = reader.text
- }
- response.failure = { resp ->
- results = null
- }
- }
- return results
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement