Send JSON body in a PUT request using nGrinder's Groovy APIs.
See original GitHub issueHi Team
I am usgin groovy to write nGrinder script. My APIS accept JSON payload as request body and the available options for PUT call, as mentioned in official doument, are :
1. PUT(java.lang.String uri)
2. PUT(java.lang.String uri, byte[] data)
3. PUT(java.lang.String uri, byte[] data, NVPair[] headers)
4. PUT(java.lang.String uri, java.io.InputStream inputStream)
5. PUT(java.lang.String uri, java.io.InputStream inputStream, NVPair[] headers)
Resource: http://grinder.sourceforge.net/g3/script-javadoc/net/grinder/plugin/http/HTTPRequest.html
As you can see that, there is no method accepting either JSONObject or String as a request body.Only ByteArray and InputStreams are the valid ones.
So how to make a PUT call for an API with JSON as a request body ?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
ngrinder-user-en - Send JSON body in a PUT request. - Nabble
Hi I want to send JSON as request body for my PUT call. But there doesn't seem to be any method accepting JSON...
Read more >How to do a POST request with JSON via Groovy? [duplicate]
Regarding a working JSON example, the following sends a JSON body in a POST request and parses back the response, which will be...
Read more >How to send PUT Request in Rest Assured - REST API Testing
How to implement a PUT Request using Rest Assured? Create JSON data using Simple JSON library. Send JSON content in the body of...
Read more >Rest Assured And Be Rest Assured - Pyware
ContentTypeContentTypeJSON REST Assured also supports mapping a request project and save body mental and inch a Java object using Jackson Gson or. In...
Read more >Vert.x Core Manual
But here's a cool bit - we don't force you to use the Java API directly from ... APIs then you need a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Use code below:
Do not post any question here. Use discussion