![]()  | 
  
    das2C
    
   das core C utilities (v3) 
   | 
 
Encapsulates the status of a HTTP resource request. More...
#include <das2/http.h>

Public Member Functions | |
| DAS_API void | DasHttpResp_clear (DasHttpResp *pRes) | 
| Initialize all fields in an http response to default values.  More... | |
| DAS_API bool | DasHttpResp_init (DasHttpResp *pRes, const char *sUrl) | 
| Initialize the das_url component of an HTTP response.  More... | |
| DAS_API bool | DasHttpResp_useSsl (DasHttpResp *pRes) | 
| Returns true if the response is an SSL (Secure Socket Layer) connection.  | |
Data Fields | |
| int | nSockFd | 
| The socket file descriptor that can be used to read the message body.  More... | |
| void * | pSsl | 
| The SSL Connection if using HTTPS.  More... | |
| int | nCode | 
| The HTTP status code returned by the server (if any)  | |
| char * | sError | 
| An error message created by the library if a problem occurred.  | |
| char * | sHeaders | 
| The full HTTP header set from the final response.  | |
| char * | pMime | 
| The parsed out mime-type string from the headers.  | |
| char * | sFilename | 
| The filename (if any) provided for the message body.  | |
| struct das_url | url | 
| The parsed URL structure that was used to make the connection.  | |
Encapsulates the status of a HTTP resource request.
| DAS_API void DasHttpResp_clear | ( | DasHttpResp * | pRes | ) | 
Initialize all fields in an http response to default values.
All char fields are set to zero, the file descriptor (nSockFd) is set to -1 and the response code is set to zero. This function is called automatically by http_getBodySocket() so there is usually no need to use it directly.
| pRes | The response to clear | 
| DAS_API bool DasHttpResp_init | ( | DasHttpResp * | pRes, | 
| const char * | sUrl | ||
| ) | 
| int nSockFd | 
The socket file descriptor that can be used to read the message body.
A value of -1 indicates that the connection could not be made if pSsl is also NULL
| void* pSsl | 
The SSL Connection if using HTTPS.
If both this value and nSockFd are null it means the connection failed