Chapter 1. Introduction

Table of Contents

Feature list
How to use neon from your application
neon API guidelines
Protocol compliance
RFC2518
RFC2616

This chapter provides an introduction to neon, giving an overview of the range of features offered, and some general guidelines for using the neon API.

neon aims to provide a modern, flexible, and simple API in the C programming language for implementing HTTP and WebDAV support. The WebDAV functionality is entirely separate from the basic HTTP functionality; neon can be used simply as an HTTP client library, ignoring the WebDAV support if desired.

Feature list

The major features of the neon library are as follows:

  • A high-level interface to common HTTP and WebDAV methods. This allows you to easily dispatch a GET or a MKCOL request against a resource with a single function call.

  • A low-level interface for HTTP request handling; allowing you to implement requests using arbitrary methods and request headers, capture arbitrary response headers, and so on.

  • Persistent connection support; neon groups a set of requests to a server into a "session"; requests within that session can use a persistent (also known as "keep-alive") connection.

  • Modern HTTP authentication support: a complete implementation of the new authentication standard, RFC2617, supporting the Digest (MD5) and Basic schemes, including integrity checking. Credentials are supplied by an application-defined callback.

  • Proxy server support; a session can be set to use a proxy server. Authentication is supported for the Proxy as well as the origin server.

  • Complete SSL support; a simple interface for enabling SSL, hiding the complexity of using an SSL library directly. Client certificate support, callback-based server certificate verification, along with functions to load trusted CA certificates.

  • Generic XML parsing interface for handling XML response bodies using SAX-like callbacks. Both the expat and libxml XML parser libraries are supported.

  • WebDAV metadata support; set and remove properties, query properties (PROPFIND); simple interface for retrieving "flat" byte-string properties, more advanced support for parsing "complex" XML structured properties.

  • Build environment support: the neon source tree is designed so that it can be embedded in your application's build tree; autoconf macros are supplied for integration. To get started quickly a neon-config script is included, to easily determine how to compile and link against an installed copy of neon

  • Complete test suite: the neon test suite comprises half as many lines of source code as the library itself, including many tests for protocol compliance in network behaviour, and that the library implementation meets the guarantees made by the API.