diff options
Diffstat (limited to 'protocols/Steam/src/http_request.h')
-rw-r--r-- | protocols/Steam/src/http_request.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/protocols/Steam/src/http_request.h b/protocols/Steam/src/http_request.h index 4c7b83509d..843ed94cda 100644 --- a/protocols/Steam/src/http_request.h +++ b/protocols/Steam/src/http_request.h @@ -5,10 +5,10 @@ class HttpResponse { - NETLIBHTTPREQUEST *m_response; + MHttpResponse *m_response; public: - HttpResponse(NETLIBHTTPREQUEST *response) : + HttpResponse(MHttpResponse *response) : m_response(response) { } @@ -20,12 +20,12 @@ public: bool operator!() const { - return !m_response || !m_response->pData; + return !m_response || m_response->body.IsEmpty(); } operator bool() const { - return m_response && m_response->pData; + return m_response && !m_response->body.IsEmpty(); } bool IsSuccess() const @@ -37,16 +37,14 @@ public: char* data() const { - return (m_response) ? m_response->pData : nullptr; + return (m_response) ? m_response->body.GetBuffer() : nullptr; } unsigned length() const { - return (m_response) ? m_response->dataLength : 0; + return (m_response) ? m_response->body.GetLength() : 0; } - LIST<NETLIBHTTPHEADER> Headers() const; - int GetStatusCode() const { if (m_response) |