Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 4th, 2008, 10:33 AM
daphnad daphnad is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 19 daphnad User rank is Sergeant (500 - 2000 Reputation Level)daphnad User rank is Sergeant (500 - 2000 Reputation Level)daphnad User rank is Sergeant (500 - 2000 Reputation Level)daphnad User rank is Sergeant (500 - 2000 Reputation Level)daphnad User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 h 11 m 14 sec
Reputation Power: 0
How to define user-agent in ant task

Hello,

I'm using the ant task Get to download a file from the internet.
I'm running the ant from the eclipse, and the request beeing send contains:
User-Agent: Java/1.6.0_03

(I used Fiddler application to figer this out).

As a result, i'm not getting the expected file.

How can i tell the ant or the Java not to send the User-Agent parameter?

Thanks!

Reply With Quote
  #2  
Old May 12th, 2008, 08:50 AM
daphnad daphnad is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 19 daphnad User rank is Sergeant (500 - 2000 Reputation Level)daphnad User rank is Sergeant (500 - 2000 Reputation Level)daphnad User rank is Sergeant (500 - 2000 Reputation Level)daphnad User rank is Sergeant (500 - 2000 Reputation Level)daphnad User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 h 11 m 14 sec
Reputation Power: 0
Thumbs down

If someone else will have this problem - this is the result.

The ant task getMethod allows to configure the html header:

Code:
<getMethod url=" " responsedatafile="c:\\out.xml">
         <header name="User-Agent" value="testva"></header>
</getMethod>
Comments on this post
ishnid agrees: Thanks for posting back

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > How to define user-agent in ant task


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway