alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (index.apt)

This example source code file (index.apt) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java tags/keywords

apache, foundation, http, httpclient, https, hypertext, license, plug-in, protocol, rfc, see, software, the, transfer

The index.apt example source code

~~ ====================================================================
~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements.  See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership.  The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License.  You may obtain a copy of the License at
~~ 
~~   http://www.apache.org/licenses/LICENSE-2.0
~~ 
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied.  See the License for the
~~ specific language governing permissions and limitations
~~ under the License.
~~ ====================================================================
~~ 
~~ This software consists of voluntary contributions made by many
~~ individuals on behalf of the Apache Software Foundation.  For more
~~ information on the Apache Software Foundation, please see
~~ <http://www.apache.org/>.

    ----------
    HttpComponents HttpClient Overview
    ----------
    ----------
    ----------

HttpClient Overview

    The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant protocol used on the 
    Internet today. Web services, network-enabled appliances and the growth of network computing 
    continue to expand the role of the HTTP protocol beyond user-driven web browsers, while 
    increasing the number of applications that require HTTP support.

    Although the java.net package provides basic functionality for accessing resources via HTTP, it 
    doesn't provide the full flexibility or functionality needed by many applications. HttpClient 
    seeks to fill this void by providing an efficient, up-to-date, and feature-rich package 
    implementing the client side of the most recent HTTP standards and recommendations.

    Designed for extension while providing robust support for the base HTTP protocol, HttpClient 
    may be of interest to anyone building HTTP-aware client applications such as web browsers, web 
    service clients, or systems that leverage or extend the HTTP protocol for distributed 
    communication.

{Documentation}

    * HttpClient Tutorial ( {{{tutorial/html}HTML}} / {{{tutorial/pdf/httpclient-tutorial.pdf}PDF}} )
    
    * Some examples of HttpClient in action can be found {{{examples.html}here}}
    
{Features}

    * Standards based, pure Java, implementation of HTTP versions 1.0 and 1.1
 
    * Full implementation of all HTTP methods (GET, POST, PUT, DELETE, HEAD, OPTIONS, and TRACE) 
    in an extensible OO framework.
    
    * Supports encryption with HTTPS (HTTP over SSL) protocol.

    * Transparent connections through HTTP proxies.

    * Tunneled HTTPS connections through HTTP proxies, via the CONNECT method.

    * Basic, Digest authentication schemes. Please note NTLM is supported only partially.

    * Plug-in mechanism for custom authentication schemes.

    * Pluggable secure socket factories, making it easier to use third party solutions

    * Connection management support for use in multi-threaded applications. Supports setting the 
      maximum total connections as well as the maximum connections per host. Detects and closes 
      stale connections.

    * Automatic Cookie handling for reading Set-Cookie: headers from the server and sending them 
      back out in a Cookie: header when appropriate.

    * Plug-in mechanism for custom cookie policies.

    * Request output streams to avoid buffering any content body by streaming directly to the socket
      to the server.

    * Response input streams to efficiently read the response body by streaming directly from the 
      socket to the server.

    * Persistent connections using KeepAlive in HTTP/1.0 and persistance in HTTP/1.1

    * Direct access to the response code and headers sent by the server.

    * The ability to set connection timeouts.

    * Source code is freely available under the Apache License.

{Standards Compliance}

    HttpClient strives to conform to the following specifications endorsed by the Internet 
    Engineering Task Force (IETF) and the internet at large:

    * {{{http://www.ietf.org/rfc/rfc1945.txt}RFC 1945}} Hypertext Transfer Protocol -- HTTP/1.0

    * {{{http://www.ietf.org/rfc/rfc2616.txt}RFC 2616}} Hypertext Transfer Protocol -- HTTP/1.1
    
    * {{{http://www.ietf.org/rfc/rfc2617.txt}RFC 2617}} HTTP Authentication: Basic and Digest Access 
      Authentication

    * {{{http://www.ietf.org/rfc/rfc2109.txt}RFC 2109}} HTTP State Management Mechanism (Cookies)
    
    * {{{http://www.ietf.org/rfc/rfc2965.txt}RFC 2965}} HTTP State Management Mechanism (Cookies v2)

Other Java examples (source code examples)

Here is a short list of links related to this Java index.apt source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.