Is it possible to do a HTTP post from a Processing program?

I’ve been a Processing heavy user for years. Among other things have used loadString() quite a lot to fetch information from web server(s) . Is there a counterpart to loadStrings() which would allow me to do a HTTP post to (my own) webserver? I looked in the documentation and saveStrings doesn’t seem to support the use of URL parameters.

Or, should I just start learning P5*js? I’m afraid the latter is true :slight_smile:

Hello,

This may be of interest:

:)

1 Like

For POST specifically note that for Processing 4 / Java11+, posting can be done through java.net.http.HttpClient.

An example (in Java):

https://zetcode.com/java/getpostrequest/

…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:

3 Likes

Thx a lot! Looks very useful,will try this tomorrow.

1 Like