1

Is it possible not to use custom API but simply send JSON request and recieve JSON response (use REST api)?

1 Answer 1

3

So by saying "is it possible not to use custom API", you mean you don't want to use something like HttpBuilder, you just want to use raw groovy?

If you're only doing GETs, you can just us the URL class and it's text method, and manually parse the JSON, but that is very limited.

If you need to do POST/PUT/DELETE/HEAD/etc, you're probably better off using something like HttpBuilder. If that's not an option, you're left with implementing a subset of what HttpBuilder or HttpClient performs.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.