mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:07:44 +00:00
GHttp: Work on bringing this up.
This commit is contained in:
parent
8f30657390
commit
51b4d3fe5a
9 changed files with 93 additions and 16 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <LibGUI/GNetworkJob.h>
|
||||
#include <LibGUI/GHttpRequest.h>
|
||||
#include <AK/HashMap.h>
|
||||
|
||||
class GTCPSocket;
|
||||
|
||||
|
@ -15,6 +16,16 @@ public:
|
|||
virtual const char* class_name() const override { return "GHttpNetworkJob"; }
|
||||
|
||||
private:
|
||||
enum class State {
|
||||
InStatus,
|
||||
InHeaders,
|
||||
InBody,
|
||||
Finished,
|
||||
};
|
||||
|
||||
GHttpRequest m_request;
|
||||
GTCPSocket* m_socket { nullptr };
|
||||
State m_state { State::InStatus };
|
||||
int m_code { -1 };
|
||||
HashMap<String, String> m_headers;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue