00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00027 #ifndef _RTXHTTP_H_
00028 #define _RTXHTTP_H_
00029
00030 #include "rtxsrc/rtxArrayList.h"
00031 #include "rtxsrc/rtxNetUtil.h"
00032
00033 typedef struct OSRTHttpHeader {
00034 OSUINT8 majorVersion;
00035 OSUINT8 minorVersion;
00036 OSINT32 status;
00037 OSRTArrayList fields;
00038 } OSRTHttpHeader;
00039
00040 typedef struct OSRTHttpContent {
00041 size_t length;
00042 OSOCTET* data;
00043 } OSRTHttpContent;
00044
00045 #ifdef __cplusplus
00046 extern "C" {
00047 #endif
00048
00060 EXTERNRT int rtxHttpGet
00061 (OSCTXT* pctxt, const char* url, OSRTHttpContent* pContent);
00062
00071 EXTERNRT int rtxHttpSendGetRequest (OSRTNETCONN* pNetConn, const char* url);
00072
00082 EXTERNRT int rtxHttpSendRequest (OSRTNETCONN* pNetConn,
00083 const char* method, const char* content, const char* contentType);
00084
00094 EXTERNRT int rtxHttpRecvRespHdr
00095 (OSRTNETCONN* pNetConn, OSRTHttpHeader* pHeader);
00096
00107 EXTERNRT int rtxHttpRecvContent
00108 (OSRTNETCONN* pNetConn, OSRTHttpHeader* pHeader, OSRTHttpContent* pContent);
00109
00110 #ifdef _TRACE
00111
00118 void rtxDiagPrintHttpHeader (OSCTXT* pctxt, const OSRTHttpHeader* pHeader);
00119 #endif
00120
00121 #ifdef __cplusplus
00122 }
00123 #endif
00124
00125 #endif