NetServices: partial implementation of the receive function

This initial implementation contains a lot of extra debuggin output that will
be removed in future changes. It is now possible to run a simple GET request
to the test server with gzip encoding.

Change-Id: I2c402e5cf80b94b366563888222a891a1b094b7a
This commit is contained in:
Niels Sascha Reedijk
2022-04-18 14:34:46 +01:00
parent 8ccf8fb44d
commit d482381d2c
6 changed files with 522 additions and 106 deletions
+13 -3
View File
@@ -10,14 +10,24 @@
#include <String.h>
class BDataIO;
namespace BPrivate {
namespace Network {
class BHttpFields;
struct HttpResultPrivate;
struct BHttpBody
{
std::unique_ptr<BDataIO> target = nullptr;
BString text;
};
struct BHttpStatus
{
int16 code = 0;
@@ -39,12 +49,12 @@ public:
// Blocking Access Functions
const BHttpStatus& Status() const;
// BHttpHeaders& Headers() const;
// BHttpBody& Body() const;
const BHttpFields& Fields() const;
BHttpBody& Body() const;
// Check if data is available yet
bool HasStatus() const;
bool HasHeaders() const;
bool HasFields() const;
bool HasBody() const;
bool IsCompleted() const;