~~ $HeadURL$ ~~ $Revision$ ~~ $Date$ ~~ ~~ ==================================================================== ~~ 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 ~~ . ---------- HttpComponents HttpCore Examples ---------- ---------- ---------- HttpCore Examples * {{{http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpGet.java}Basic HTTP GET}} This example demonstrates how to execute a series of simple HTTP GET requests. * {{{http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpPost.java}Basic HTTP POST}} This example demonstrates how to execute a series of simple HTTP POST requests that enclose entity content of various types: a string, a byte array, an arbitrary input stream. * {{{http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/examples/org/apache/http/examples/ElementalHttpServer.java}Basic HTTP server}} This is an example of a simple but fully functional HTTP/1.1 server written with only a few dozen lines of Java code. * {{{http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java}Basic non-blocking HTTP server}} This example demonstrates the use of HttpCore NIO extensions to build a non-blocking HTTP/1.1 server. * {{{http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java}Basic non-blocking HTTP client}} This example demonstrates how HttpCore NIO can be used to execute multiple HTTP requests using only one I/O thread. * {{{http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/examples/nio/NHttpClientConnManagement.java}Management of non-blocking client connections}} This example demonstrates how to manage reuse of persistent client connections using HttpCore NIO. * {{{http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-nio/src/examples/org/apache/http/examples/nio/NHttpSSLServer.java}Basic non-blocking HTTPS server}} This example demonstrates the use of HttpCore NIO extensions to build a non-blocking HTTPS/1.1 server. * {{{http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/contrib/src/main/java/org/apache/http/contrib/compress/}Content compression}} These request/response interceptors implement client- and server-side content compression/decompression logic. They can simply be added to any existing HTTP processor to enable it for content compression. If you use an IoC container to initialize HTTP processors, you do not even have to recompile your application.