summaryrefslogtreecommitdiff
path: root/include/m_netlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/m_netlib.h')
-rw-r--r--include/m_netlib.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/m_netlib.h b/include/m_netlib.h
index 3164125e2a..1d5be72fd2 100644
--- a/include/m_netlib.h
+++ b/include/m_netlib.h
@@ -434,6 +434,10 @@ struct NETLIBHTTPHEADER
char *szValue;
};
+EXTERN_C MIR_APP_DLL(char*) Netlib_GetHeader(const NETLIBHTTPREQUEST *pRec, const char *pszName);
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
#define REQUEST_RESPONSE 0 // used by structure returned by MS_NETLIB_RECVHTTPHEADERS
#define REQUEST_GET 1
#define REQUEST_POST 2
@@ -471,6 +475,10 @@ struct NETLIBHTTPREQUEST
char *szResultDescr;
HNETLIBCONN nlc;
int timeout;
+
+ __forceinline const char *operator[](const char *pszName) {
+ return Netlib_GetHeader(this, pszName);
+ }
};
EXTERN_C MIR_APP_DLL(int) Netlib_SendHttpRequest(HNETLIBCONN hConnection, NETLIBHTTPREQUEST *pRec);