HTTP plugin. What is the useragent? or how do I set it?

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

HTTP plugin. What is the useragent? or how do I set it?

Postby swingman » Thu Feb 07, 2008 10:10 am

Hi,

I'm a using the http plugin from a headless client to consume web services from a web site. This is all works fast and fine.

Now, I have added code not to generate shopping baskets for robots such as Googlebot and Yahoo slurp by checking the useragent of the page request.

I'd like to do the same for my web service requests from Servoy, but don't know what useragent to filter out or how to generate some unique useragent...

Any ideas?
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Re: HTTP plugin. What is the useragent? or how do I set it?

Postby jjalapin » Fri Jul 18, 2008 5:19 pm

Sorry ,no idea ,but may you good luck
No pains ,no gians .
http://hostmonster-reviews.org
jjalapin
 
Posts: 3
Joined: Thu Jul 17, 2008 9:17 am

Postby ryanparrish » Fri Jul 18, 2008 6:02 pm

If you setup a client first with .createHttpClient() before .getPageData it uses apache httpclient

"Jakarta Commons-httpclient/$VERSION"

Or if you just use .getPageData() it uses java.net.URLConnection

"Java/$VERSION"

$VERSION is the java version of the client with plain .getPageData().
$VERSION is the version of apache httpclient when you use .createHttpClient() - although I can't recall off the top of my head what version of httpclient servoy uses. But that should give you enough to filter.
ryanparrish
 
Posts: 162
Joined: Thu May 17, 2007 7:49 pm
Location: Miami, FL


Return to Web Development

Who is online

Users browsing this forum: No registered users and 10 guests