These are chat archives for Mashape/unirest-java

25th
Aug 2016
Gursewak Singh
@Gursewak1990_twitter
Aug 25 2016 08:39

Greetings!
I'm new to Java world, and was trying to use this library, where I want to make concurrent requests to a single URL.
I have set the concurrency level as shown below:

Unirest.setConcurrency(50, 10);

then I'm trying to make http POST request:

HttpResponse<String> postResponse = Unirest
.post("http://localhost:8080/")
.header("Content-Type", "application/fastinfoset")
.body(reqArray).asString();

But only single request is sent to server. So this this right way to achive this?
If i'm doing it wrong, Please offer some help to make concurrent calls to a single URL
(Say 100 request at same time) to http://localhost:8080/

Thanks in Advance