g3/g3proxy/ci/httpbin/Java+OkHttp-3/README.md
2023-03-09 17:55:45 +08:00

682 B

Java OkHttp Testcases

This directory contains the testcases written in Java, using OkHttp 3.x as the http client library.

How to run

# compile
javac -cp /usr/share/java/okhttp.jar -d ./build *java
# compress to jar, so it can be copied anywhere
cd build
jar cvf httpbin.jar com
# run
java -cp /usr/share/java/okhttp.jar:httpbin.jar com.example.httpbin.<classname> <params>

Testcases

AuthPostFile

Reading a file and POST it's content to http://httpbin.org/post.

PreemptiveBasicAuthentication is not enabled, so we can use this testcase to test the untrusted read functionality of the http proxy server.