Skip to content

Connection timeout #18

@ymasaev

Description

@ymasaev

Is there any easy way to set the connection timeout? Something like this:

HttpResponse<MyClass> jsonResponse = Unirest.post("http://httpbin.org/post")
  .setTimeout(3000)
  .header("accept", "application/json")
  .field("parameter", "value")
  .field("foo", "bar")
  .asJson<MyClass>();

or I need to do it in HttpRequest?

HttpRequest request = Unirest.post(String url);

An example would be helpful. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions