VirtualBox

Changeset 73899 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Aug 26, 2018 8:16:55 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/http: Prototyped RTHttpPerform function. bugref:9167

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/http.h

    r73888 r73899  
    193193RTR3DECL(int) RTHttpGetFile(RTHTTP hHttp, const char *pszUrl, const char *pszDstFile);
    194194
     195/** HTTP methods. */
     196typedef enum RTHTTPMETHOD
     197{
     198    RTHTTPMETHOD_INVALID = 0,
     199    RTHTTPMETHOD_GET,
     200    RTHTTPMETHOD_PUT,
     201    RTHTTPMETHOD_POST,
     202    RTHTTPMETHOD_PATCH,
     203    RTHTTPMETHOD_DELETE,
     204    RTHTTPMETHOD_HEAD,
     205    RTHTTPMETHOD_OPTIONS,
     206    RTHTTPMETHOD_TRACE,
     207    RTHTTPMETHOD_END,
     208    RTHTTPMETHOD_32BIT_HACK = 0x7fffffff
     209} RTHTTPMETHOD;
     210
     211/**
     212 * Performs generic blocking HTTP request, optionally returning the body and headers.
     213 *
     214 * @returns IPRT status code.
     215 * @param   hHttp           The HTTP client instance.
     216 * @param   pszUrl          The URL.
     217 * @param   enmMethod       The HTTP method for the request.
     218 * @param   puHttpStatus    Where to return the HTTP status code. Optional.
     219 * @param   ppvHeaders      Where to return the headers. Optional.
     220 * @param   pcbHeaders      Where to return the header size.
     221 * @param   ppvBody         Where to return the body.  Optional.
     222 * @param   pcbBody         Where to return the body size.
     223 */
     224RTR3DECL(int) RTHttpPerform(RTHTTP hHttp, const char *pszUrl, RTHTTPMETHOD enmMethod,
     225                            uint32_t *puHttpStatus, void **ppvHeaders, size_t *pcbHeaders, void **ppvBody, size_t *pcbBody);
     226
     227
    195228/**
    196229 * Abort a pending HTTP request. A blocking RTHttpGet() call will return with
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette