mirror of
https://github.com/bytedance/g3.git
synced 2026-04-28 11:40:54 +00:00
682 B
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.