在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:runemadsen/HTTP-Requests-for-Processing开源软件地址:https://github.com/runemadsen/HTTP-Requests-for-Processing开源编程语言:Java 68.0%开源软件介绍:IntroductionHTTP Requests for Processing is a small library that takes the pain out of doing HTTP requests in Processing. HTTP Requests for Processing is based on code by Chris Allick and Daniel Shiffman. How toInstall the library by downloading the latest release or via the Processing contribution manager. Then import the library in your sketch: import http.requests.*; Then you can make GET and POST requests from your code: GetRequest get = new GetRequest("http://httprocessing.heroku.com");
get.send();
println("Reponse Content: " + get.getContent());
println("Reponse Content-Length Header: " + get.getHeader("Content-Length"));
PostRequest post = new PostRequest("http://httprocessing.heroku.com");
post.addData("name", "Rune");
post.send();
println("Reponse Content: " + post.getContent());
println("Reponse Content-Length Header: " + post.getHeader("Content-Length")); To authenticate requests using a Basic Access authentication scheme, include the following in your requests: get.addUser("username", "password");
post.addUser("username", "password"); To add a header to your request, including the following: //method: addHeader(name,value)
get.addHeader("Accept", "application/json");
post.addHeader("Content-Type", "application/json"); |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论