http.h revision a018f30f22605aaa1f809d77716cbb148a732a32
/* $Id$ */
/** @file
* IPRT - Simple HTTP Communication API.
*/
/*
* Copyright (C) 2012-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
#ifndef ___iprt_http_h
#define ___iprt_http_h
/** @defgroup grp_rt_http RTHttp - Simple HTTP API
* @ingroup grp_rt
* @{
*/
/** RTHTTP interface handle. */
/** Pointer to a RTHTTP interface handle. */
/** Nil RTHTTP interface handle. */
#define NIL_RTHTTP ((RTHTTP)0)
/**
* Creates a HTTP interface handle.
*
* @returns iprt status code.
*
* @param phHttp Where to store the HTTP handle.
*/
/**
* Destroys a HTTP interface handle.
*
* @param hHttp Handle to the HTTP interface.
*/
/**
* Perform a simple blocking HTTP request.
*
* @returns iprt status code.
*
* @param hHttp HTTP interface handle.
* @param pcszUrl URL.
* @param ppszResponse HTTP response.
*/
/**
* Specify proxy settings.
*
* @returns iprt status code.
*
* @param hHttp HTTP interface handle.
* @param pcszProxy URL of the proxy
* @param uPort port number of the proxy, use 0 for not specifying a port.
* @param pcszUser username, pass NULL for no authentication
* @param pcszPwd password, pass NULL for no authentication
*/
const char *pcszProxyUser, const char *pcszProxyPwd);
/**
* Set custom headers.
*
* @returns iprt status code.
*
* @param hHttp HTTP interface handle.
* @param cHeaders number of custom headers.
* @param pcszHeaders array of headers in form "foo: bar".
*/
/**
* Set a custom certification authority file, containing root certificates.
*
* @returns iprt status code.
*
* @param hHttp HTTP interface handle.
* @param pcszCAFile File name containing root certificates.
*/
/** @} */
#endif