How to set request timeout and cookies in rest client

5,201 views
Skip to first unread message

Ravi Joshi

unread,
Dec 14, 2013, 6:34:23 AM12/14/13
to rest-...@googlegroups.com
Hi,

I am using RESTClient 3.2.2 CLI in one of my automation project. I want to ask below questions-

  1. How to set HTTP Request Timeout? I found a method org.wiztools.restclient.GlobalOptions().setRequestTimeoutInMillis(int time), which is not effective. Is there any other way to set it?
  2. Does RESTClient support cookies? Is it contain cookie manager?

Somebody please provide example for each of the above questions.

Many thanks

-
Regards
Ravi

Subhash Chandran

unread,
Dec 14, 2013, 9:58:43 AM12/14/13
to rest-...@googlegroups.com
For #1:

Set the request timeout in the GUI (Mac: Menu > Preference > Connection). Close the GUI so that the property is written to rest client config ~/.rest-client/rest-client.properties. Now the cli tool will take this as the input.

#2:

RESTClient does not have Cookie Manager. It is stateless.


--
You received this message because you are subscribed to the Google Groups "rest-client" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-client...@googlegroups.com.
To post to this group, send email to rest-...@googlegroups.com.
Visit this group at http://groups.google.com/group/rest-client.
For more options, visit https://groups.google.com/groups/opt_out.



--
Subhash Chandran
Author PHP OOP: Quick & Dirty for Advanced Learners
Phone: +91 979 102 0238
Skype & GTalk: subwiz

Ravi Joshi

unread,
Dec 14, 2013, 12:50:38 PM12/14/13
to rest-...@googlegroups.com
Hi Subhash,

Many thanks for the suggestions. At this time I am working with CLI version and can't use GUI, as the whole project is a automation project and everything has to be done my Java only. As a workaround may I do the following-

  1. Create a file property file named "rest-client.properties" in the location System.getProperty("user.home")+"/.rest-client/"
  2. Set a property "request-timeout-in-millis" with required value
This workaround I am planing to do before executing the RESTClient .

Is this okay?


-
Regards
Ravi

Subhash Chandran

unread,
Dec 14, 2013, 12:54:26 PM12/14/13
to rest-...@googlegroups.com

Seems good :)

Reply all
Reply to author
Forward
0 new messages