rtxHttp.h File Reference
#include "rtxsrc/rtxArrayList.h"
#include "rtxsrc/rtxNetUtil.h"
Go to the source code of this file.
Functions | |
EXTERNRT int | rtxHttpSendRequest (OSRTNETCONN *pNetConn, const char *method, const char *content, const char *contentType) |
This function sends an HTTP request to a network connection. | |
EXTERNRT int | rtxHttpRecvRespHdr (OSRTNETCONN *pNetConn, OSRTHttpHeader *pHeader) |
This function receives the initial header returned from an HTTP request. | |
EXTERNRT int | rtxHttpRecvContent (OSRTNETCONN *pNetConn, OSRTHttpHeader *pHeader, OSRTHttpContent *pContent) |
This function receives HTTP content. |
Detailed Description
Definition in file rtxHttp.h.
Function Documentation
EXTERNRT int rtxHttpRecvContent | ( | OSRTNETCONN * | pNetConn, | |
OSRTHttpHeader * | pHeader, | |||
OSRTHttpContent * | pContent | |||
) |
This function receives HTTP content.
All content associated with the response header is stored in the given memory buffer.
- Parameters:
-
pNetConn - Pointer to network connection structure. pHeader - Pointer to response header structure describing content. pContent - Buffer to receive content. Dynamic memory is allocated for the content using the rtxMemAlloc function.
- Returns:
- - Operation status: 0 if success, negative code if error.
EXTERNRT int rtxHttpRecvRespHdr | ( | OSRTNETCONN * | pNetConn, | |
OSRTHttpHeader * | pHeader | |||
) |
This function receives the initial header returned from an HTTP request.
The header response information is returned in the header structure.
- Parameters:
-
pNetConn - Pointer to network connection structure. pHeader - Pointer to header structure to receive returned data.
- Returns:
- - Operation status: 0 if success, negative code if error.
EXTERNRT int rtxHttpSendRequest | ( | OSRTNETCONN * | pNetConn, | |
const char * | method, | |||
const char * | content, | |||
const char * | contentType | |||
) |
This function sends an HTTP request to a network connection.
- Parameters:
-
pNetConn - Pointer to network connection structure. method - HTTP method to be used for request (GET or POST) content - Content to be sent after header. contentType - Type of content.
- Returns:
- - Operation status: 0 if success, negative code if error.