For POST specifically note that for Processing 4 / Java11+, posting can be done through java.net.http.HttpClient.
An example (in Java):
…and the library documentation:
https://openjdk.java.net/groups/net/httpclient/intro.html
However, isn’t available in Java 7-8 / Processing 3.x. For that, you can use the HTTP Requests For Processing by Madson and Shiffman – the library is installed through Contributions Manager. Here are related discussions:
The link has been modified so that you can view the material.
How to write the end point?
How to make a post form?
I wonder.
Try examples here:
Hi there,
At a basic level, i’ve got a Raspberry Pi with MusicBox loaded. I’m using a second machine to change the audio using HTTP requests.
My request is - { “method”: “core.playback.get_current_tl_track”, “jsonrpc”: “2.0”, “id”: 1 } posted with the header “Content-Type”, “application/json”);"
If I use another peice of software, for example Postman, to send the string, it works.
I’m using the HTTP Request library from Dan Shiftman. The issue, i think, is when I use post.addData it requires…
3 Likes