Here is an example to configure the client to use JSON
poet = new HttpPoet(url: "https://jsonplaceholder.typicode.com", contentType: ContentType.JSON, acceptContentType: ContentType.JSON) def todo = poet.get("/todos/1") println(todo) poet.post("/posts", body: [title: 'foo', body: 'bar', userId: 1])
There was an error while loading. Please reload this page.