RSA Security logo

RSA BSAFE Cert-C
API Reference

httpapi.h

Go to the documentation of this file.
00001 /*  
00002 ** Copyright (c) 2002, RSA Security Inc.
00003 **
00004 ** This file is used to demonstrate how to interface to an RSA
00005 ** Security Inc. licensed development product.  You have a
00006 ** royalty-free right to use, modify, reproduce and distribute this
00007 ** demonstration file (including any modified version), provided that
00008 ** you agree that RSA Security Inc. has no warranty, implied or
00009 ** otherwise, or liability for this demonstration file or any modified
00010 ** version.
00011 **
00012 */
00013 
00014 #ifndef HEADER_BSAFE_CERTC_PROVIDER_API_HTTPAPI
00015 #define HEADER_BSAFE_CERTC_PROVIDER_API_HTTPAPI 1
00016 
00017 
00024 #include "certc.h"
00025 #include "transprt.h"
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 /* For use with HTTP_REQUEST_INFO.method below */
00032 #define HTTP_REQUEST_METHOD_UNDEFINED 0    /* unset/undefined method value */
00033 #define   HTTP_REQUEST_METHOD_MIN       1  /* not intended for application use */
00034 #define HTTP_REQUEST_METHOD_GET       1    /* HTTP GET method */
00035 #define HTTP_REQUEST_METHOD_POST      2    /* HTTP POST method */
00036 #define   HTTP_REQUEST_METHOD_MAX       2  /* not intended for application use */
00037 
00072 typedef struct {
00073   int      method;  /* HTTP_REQUEST_METHOD_GET or HTTP_REQUEST_METHOD_POST  */
00074   ITEM     data;    /* request body                        */
00075   LIST_OBJ headers; /* HTTP request headers                */
00076 } HTTP_REQUEST_INFO;
00077 
00120 typedef struct {
00121   unsigned int status;   /* HTTP return code       */
00122   ITEM         data;     /* response body          */
00123   LIST_OBJ     headers;  /* HTTP response headers  */
00124 } HTTP_RESPONSE_INFO;
00125 
00160 int
00161 C_SendHTTPRequest(
00162   CERTC_CTX           ctx,            /* (in)  Cert-C context                      */
00163   HTTP_REQUEST_INFO  *pRequestInfo,   /* (in)  HTTP request information            */
00164   TRANSPORT_INFO     *pTransportInfo, /* (in)  transport info (url, proxies, etc.) */
00165   HTTP_RESPONSE_INFO *pResponseInfo); /* (out) HTTP response information           */
00166 
00167 #ifdef __cplusplus
00168 }
00169 #endif
00170 
00171 #endif /* HEADER_BSAFE_CERTC_PROVIDER_API_HTTPAPI */



RSA BSAFE® Cert-C 2.7 API Reference