runemadsen / HTTP-Requests-for-Processing

http://www.runemadsen.com
MIT License
140 stars 39 forks source link

Adding a body to a post request #23

Closed criaturaExperimental closed 5 years ago

criaturaExperimental commented 8 years ago

How can I add a body to a post request? Is there a function I could use like write()? Or some type of workaround?

I want to pass this json info as the body of the request: { "url": "http://example.com/picture.jpg" }

Thanks :)

Sega01 commented 8 years ago

+1, looking for this feature too.

I found something, that helped me at least: https://forum.processing.org/two/discussion/comment/50477/#Comment_50477

mms92 commented 5 years ago

simply use addData( String key, String value ) function from this library , even if i can't use it 'cause processing don't recognize it

in your case it would be post.addData( "url", "http://example.com/picture.jpg" );

criaturaExperimental commented 5 years ago

It works, thank you!