RSA Security logo

RSA BSAFE Cert-C
API Reference

HTTP_RESPONSE_INFO Struct Reference

Holds information associated with an HTTP-transported response.

This includes the metadata returned by the server, as well as the data returned by the server. The caller of an API that uses this data structure should call T_memset to set this buffer to 0 before use.

Data Fields
status The HTTP status code returned by the HTTP server; for example, 200 for OK, 404 for Not Found, and so forth. These status values are defined in RFC 1945.
data An ITEM structure that contains the data returned by the server. If the server reports an error, data can contain the HTML text the browser presents to the user. If the server does not report an error, data usually contains either HTML, XML, or application data. When this field is set to a non-zero value as a result of calling an API function, it is the responsibility of the application to free the space allocated in HTTP_RESPONSE_INFO.data.data.
headers A LIST_OBJ that contains HTTP response headers associated with the returned data. The application may need to search this list to retrieve the Content-Type of the returned data, if there is any ambiguity about the type of the returned data. If the caller chooses not to have the headers of the HTTP response returned, the application should use (LIST_OBJ)0 for this parameter. Otherwise, the application must supply a valid LIST_OBJ to hold this header information. Returned headers are ITEMs in which the data fields contain NUL-terminated strings. The NUL character is not included in the ITEM's len count, so these ITEMs can be used safely with standard C-library functions.

Note: The application must destroy the LIST_OBJ to avoid memory leaks.

#include <httpapi.h>

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;

The documentation for this struct was generated from the following file:


RSA BSAFE® Cert-C 2.7 API Reference