Products
Applications
Support
Company
How To Buy
Skip to main content (Press Enter).
Sign in
Skip auxiliary navigation (Press Enter).
Register
Skip main navigation (Press Enter).
Toggle navigation
Home
Communities
All Communities
Application Networking and Security
Carbon Black
Enterprise Software
Mainframe Software
Symantec Enterprise
Tanzu
VMware {code}
VMware Cloud Foundation
Blogs
All Blogs
Enterprise Software
Mainframe Software
Symantec Enterprise
VMware
Events
VMware Explore 2025
All Events
Enterprise Software
Mainframe Software
Symantec Enterprise
VMware Cloud Foundation Events
Water Cooler
Betas
Flings
Education
Groups
Enterprise Software
Mainframe Software
Symantec Enterprise
VMware
Members
VMware vSphere
View Only
Community Home
Threads
703K
Library
2.7K
Blogs
0
Events
0
Members
100K
Back to discussions
Expand all
|
Collapse all
sort by most recent
sort by thread
Timeout in groovy http request
Jump to
Best Answer
jvalkeal_hyperi
Feb 12, 2009 11:52 AM
If I do http request from groovy templates by defining new URL class and fetch content, is it possible ...
admin
Feb 12, 2009 05:45 PM
Best Answer
Hi Janne, I don't know of a way to set the timeout there.. I guess that's the price you pay for convenience ...
jvalkeal_hyperi
Feb 12, 2009 06:29 PM
Thanks Ryan, that's it. The most simplest solution you can get. :) Sometimes when you walk on the ...
admin
Feb 27, 2009 08:11 PM
Too funny. Love the analogy. Charles
1.
Timeout in groovy http request
Recommend
jvalkeal_hyperi
Posted Feb 12, 2009 11:52 AM
Reply
Reply Privately
Options Dropdown
If I do http request from groovy templates by defining new URL class and fetch content, is it possible change default timeout values.
Here's example of groovy snippet:
def url = new URL("http://myserver.foo.com/test")
def content = url.getText()
This works ok if server is available or if request gives any kind of error. However, if this connection timeouts it's totally messing my alert templates. Eventually HQ template engine will notice that there is long running methods, but it will take too much time. I just want to ensure that template is ran within 10 seconds.
If somebody wants to know why I'm trying to do http request from alert template, here's short answer. I have a external(wiki) knowledge base to store alert documentation. Here I'm just trying to include some documentation to emails what HQ is sending to users.
This is kind of groovy problem. Does anybody know any workaround for this issue?
2.
RE: Timeout in groovy http request
Best Answer
Recommend
admin
Posted Feb 12, 2009 05:45 PM
Reply
Reply Privately
Options Dropdown
Hi Janne,
I don't know of a way to set the timeout there.. I guess that's the price you pay for convenience when using those Groovy shortcut methods.
You may just have to do it the old fashioned way. As an alternative, HQ does ship with commons-httpclient, so you could also use that if you need more fine grained control over the parameters & connection settings.
-Ryan
3.
RE: Timeout in groovy http request
Recommend
jvalkeal_hyperi
Posted Feb 12, 2009 06:29 PM
Reply
Reply Privately
Options Dropdown
Thanks Ryan, that's it. The most simplest solution you can get. :)
Sometimes when you walk on the left side of the road, you totally forget that there's right side where you can jump. Gosh, how blind a man can be. OK, sometimes I also forget that java and groovy are like old couple, they're living on the same house but has separate bedrooms ;)
4.
RE: Timeout in groovy http request
Recommend
admin
Posted Feb 27, 2009 08:11 PM
Reply
Reply Privately
Options Dropdown
Too funny. Love the analogy.
Charles
×
New Best Answer
This thread already has a best answer. Would you like to mark this message as the new best answer?
Copyright 2024. All rights reserved.
Powered by Higher Logic