Solved

Posting a file to a URL with HttpClient

Posted on 2007-03-20
4
207 Views
Last Modified: 2010-03-31
I am looking for some sample Java code showing how to post (HTTP POST method) a file to a URL using the HttpClient library (link below). Anyone has anything like this?

http://jakarta.apache.org/commons/httpclient/

Alex
0
Comment
Question by:avernet
  • 3
4 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 18760116
There are examples with the download
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 125 total points
ID: 18760137
e.g.

<INSTALL DIR>/src/examples/PostXML.java
0
 
LVL 1

Author Comment

by:avernet
ID: 18765983
CEHJ,

Excellent; it works perfectly, thank you.

Alex
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 18766289
:-)
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question