Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

Re: [groovy-user] HTTP Post/Get

uri

2010-03-11

Replies: Find Java Web Hosting

Author LoginPost Reply
HtmlUnit also works great, if you want to actually do something with the webpage.

http://htmlunit.sourceforge.net/

@Grapes(@Grab(group='net.sourceforge.htmlunit', module='htmlunit', version='2.6'))
import com.gargoylesoftware.htmlunit.WebClient

def client = new com.gargoylesoWebClient()
def dlPage = client.getPage("http://somepage.com")
...

On Thu, Mar 11, 2010 at 11:12 AM, Tom Nichols <tmnichols@gmail.com> wrote:
See also: http://groovy.codehaus.org/modules/http-builder/
for a slightly more sophisticated (aka complex) way to do it.

</shameless self-promotion>



On Thu, Mar 11, 2010 at 11:05 AM, Tim Yates <tim.yates@gmail.com> wrote:
> new URL( "http://www.google.com" ).text
>
> On Thu, Mar 11, 2010 at 4:02 PM, Anders Viklund <viklund_anders@hotmail.com>
> wrote:
>>
>> Hi,
>>
>> is there a simple way to fetch the contents of a web page using Groovy?
>>
>> Thanks!
>>
>> ________________________________
>> Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up
>> now.
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



©2008 gg3721.com - Jax Systems, LLC, U.S.A.