Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.326.350 Times

HTTPClient 0.3-3

  Date Added: July 08, 2010  |  Visits: 869

HTTPClient

Report Broken Link
Printer Friendly Version


Product Homepage
Download (90 downloads)



This package provides a complete http client library. It currently implements most of the relevant parts of the HTTP/1.0 and HTTP/1.1 protocols, including the request methods HEAD, GET, POST and PUT, and automatic handling of authorization, redirection requests, and cookies. Furthermore the included Codecs class contains coders and decoders for the base64, quoted-printable, URL-encoding, chunked and the multipart/form-data encodings. The whole thing is free, and licenced under the GNU Lesser General Public License (LGPL) (note that this is not the same as the GPL). Following are the kits and documentation for the HTTPClient Version 0.3-3. If you have any problems, bugs, suggestions, comments, etc. see the info on debugging and reporting problems. An older version of these pages are also available in Japanese, thanks to the kindly efforts of Yuji Kumasaka. Using the HTTPClient should be quite simple. First add the import statement import HTTPClient.*; to your file(s). Next you create an instance of HTTPConnection (youll need one for every server you wish to talk to). Requests can then be sent using one of the methods Head(), Get(), Post(), etc in HTTPConnection. These methods all return an instance of HTTPResponse which has methods for accessing the response headers (getHeader(), getHeaderAsInt(), etc), various response info (getStatusCode(), getReasonLine(), etc), the response data (getData(), getText(), and getInputStream()) and any trailers that might have been sent (getTrailer(), getTrailerAsInt(), etc). Following are some examples to get started. To retrieve files from the URL "http://www.myaddr.net/my/file" you can use something like the following: try { HTTPConnection con = new HTTPConnection("www.myaddr.net"); HTTPResponse rsp = con.Get("/my/file"); if (rsp.getStatusCode() >= 300) { System.err.println("Received Error: "+rsp.getReasonLine()); System.err.println(rsp.getText()); } else data = rsp.getData(); rsp = con.Get("/another_file"); if (rsp.getStatusCode() >= 300) { System.err.println("Received Error: "+rsp.getReasonLine()); System.err.println(rsp.getText()); } else other_data = rsp.getData(); } catch (IOException ioe) { System.err.println(ioe.toString()); } catch (ParseException pe) { System.err.println("Error parsing Content-Type: " + pe.toString()); } catch (ModuleException me) { System.err.println("Error handling request: " + me.getMessage()); } This will get the files "/my/file" and "/another_file" and put their contents into byte[]s accessible via getData(). Note that you need to only create a new HTTPConnection when sending a request to a new server (different protocol, host or port); although you may create a new HTTPConnection for every request to the same server this not recommended, as various information about the server is cached after the first request (to optimize subsequent requests) and persistent connections are used whenever possible (see also Advanced Info). To POST form data from an applet back to your server you could use something like this (assuming you have two fields called name and e-mail, whose contents are stored in the variables name and email): try { NVPair form_data[] = new NVPair[2]; form_data[0] = new NVPair("name", name); form_data[1] = new NVPair("e-mail", email); // note the convenience constructor for applets HTTPConnection con = new HTTPConnection(this); HTTPResponse rsp = con.Post("/cgi-bin/my_script", form_data); if (rsp.getStatusCode() >= 300) { System.err.println("Received Error: "+rsp.getReasonLine()); System.err.println(rsp.getText()); } else stream = rsp.getInputStream(); } catch (IOException ioe) { System.err.println(ioe.toString()); } catch (ModuleException me) { System.err.println("Error handling request: " + me.getMessage()); } Here the response data is read at leisure via an InputStream instead of all at once into a byte[]. As another example, if you want to upload a document to a URL (and the server supports http PUT) you could do something like the following: try { URL url = new URL("http://www.mydomain.us/test/my_file"); HTTPConnection con = new HTTPConnection(url); HTTPResponse rsp = con.Put(url.getFile(), "Hello World"); if (rsp.getStatusCode() >= 300) { System.err.println("Received Error: "+rsp.getReasonLine()); System.err.println(rsp.getText()); } else text = rsp.getText(); } catch (IOException ioe) { System.err.println(ioe.toString()); } catch (ModuleException me) { System.err.println("Error handling request: " + me.getMessage()); }.

Requirements: No special requirements
Platforms: Linux
Keyword: Catch Complete Http Data Form Http Http Client Httpclient Httpconnection Httpresponse New Nvpair Received Error Server Url
Users rating: 0/10

License: Freeware Size: 532.48 KB
USER REVIEWS
More Reviews or Write Review


HTTPCLIENT RELATED
Libraries  -  Curl HTTP Client 1.1
Curl HTTP Client is a PHP class that implements an HTTP client using the PHP Curl library extension. Frequently, in my daytime job I have to fetch data from various url’s, either by sending get or post request, binding to different IP address...
3.07 KB  
Development Editors  -  HTTP Client for Mac OS 0.9.1
Developer tool for debugging HTTP services by graphically creating and inspecting complex HTTP messages.
286.72 KB  
Libraries  -  FUNDAMENTALS HTTP 4.00.08
FUNDAMENTALS HTTP was specially developed as a Delphi / FreePascal unit that implements routines for various HTTP client and server classes. Now you can make use of this handy and accessible library to improve your development process.
 
Networking Tools  -  PPTP Client 1.7.1
PPTP Client allows you to connect to a PPTP server from a Linux box. It sets up a PPTP connection, after which the PPP daemon establishes a PPP link over that PPTP call. So youd like to run a PPTP tunnel from your Linux, FreeBSD, NetBSD or...
58.37 KB  
Networking Tools  -  Send HTTP Tool 2.5.1
Powerful and free bugging/testing tool for web sites and web application. With Send HTTP Tool you able to generate and send different HTTP request to any URL and in a second view full report about the HTTP response. This is a great tool for...
634 B  
Libraries  -  HTTunnel::Client 0.08
HTTunnel::Client is a client class for Apache::HTTunnel. SYNOPSIS my $hc = new HTTunnel::Client("http://localhost/httunnel") ; $hc->connect(tcp, $some_host, $some_port) ; $hc->print(some request) ; my $some_response = $hc->read(1024) ;...
20.48 KB  
Libraries  -  LibSoup 2.2.100
LibSoup is an HTTP client/server library for GNOME. LibSoup library uses GObjects and the glib main loop, to integrate well with GNOME applications..
614.4 KB  
Text Chat Clients  -  PJIRC 2.1.1
PJIRC is an IRC client, just like Opera is a HTTP client. PJIRC is just another front-end for the well-known IRC network. Youre supposed to be familiar with the IRC concepts. If not, you should try to find more information about it before going...
528.38 KB  
FTP Clients  -  Fletch 0.46
Fletch is a non-interactive FTP/HTTP client-agent designed to perform in bandwidth-deficient environments. It maintains a queue of jobs that are executed when a connection is available. Job states are maintained and a job is retried till it...
7.17 KB  
Network & Internet  -  Java NTLM Proxy 0.2
Forwards non-NTLM HTTP client requests to an NTLM proxy server (ie. Microsoft IAS). Can also forward a local port to a remote machine.
689.23 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, NETWORK & INTERNET
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Network & Internet  -  Free WiFi Hotspot 3.3.1
Free WiFi Hotspot is a super easy solution to turn your laptop or notebook into a portable Wi-Fi hotspot, wirelessly sharing your internet connections like DSL, Cable, Bluetooth, Mobile Broadband Card, Dial-Up, etc. through the built-in wireless...
1.04 MB  
Network & Internet  -  Easy Uploads 1.8
Easy uploads is a file storage media streaming application designed by Filestreamers that allows you to upload, store, and stream your files from their virtually unlimited file storage server. Easy Uploads can backup,share, and stream your files...
615.97 KB  
Network & Internet  -  PacketFence ZEN 3.1.0
PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) system. Boosting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, 802.1X...
1024 MB  
Network & Internet  -  django-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 KB  
Network & Internet  -  SQL Inject Me 0.4.5
SQL Inject Me is a Firefox extension used to test for SQL Injection vulnerabilities. The tool works by submitting your HTML forms and substituting the form value with strings that are representative of an SQL Injection attack.
133.12 KB