/Sphinx

a simple java library to make http requests in one line

Primary LanguageJava

Sphinx

How to use

Get method

SHttpRequest request = new SHttpRequest("web server domain here");

// If there is no headers

// Use this

String response = request.get(null);

// else

HashMap<String,String> headers = new HashMap<String,String>();
//Ex
headers.put("content-type","application/json");

String response = request.get(headers);

System.out.println(response);

Post method

SHttpRequest request = new SHttpRequest("web server domain here");

// If there is no headers

// Use this

String response = request.post("the payload here",null);

// else

HashMap<String,String> headers = new HashMap<String,String>();
//Ex
headers.put("content-type","application/json");

String response = request.post("the payload here",headers);

System.out.println(response);

Credits

  • All copyright reserved to REVENGE and SW3RD

Note

  • I will add proxy support

  • Any problem open a case