mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
Start working on a Downloader app and backing classes in LibGUI.
LibGUI is slowly becoming LibKitchensink but I'm okay with this for now.
This commit is contained in:
parent
c7365a00f8
commit
8f30657390
21 changed files with 375 additions and 1 deletions
23
LibGUI/GHttpResponse.h
Normal file
23
LibGUI/GHttpResponse.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/GNetworkResponse.h>
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/HashMap.h>
|
||||
|
||||
class GHttpResponse : public GNetworkResponse {
|
||||
public:
|
||||
virtual ~GHttpResponse() override;
|
||||
static Retained<GHttpResponse> create(int code, ByteBuffer&& payload)
|
||||
{
|
||||
return adopt(*new GHttpResponse(code, move(payload)));
|
||||
}
|
||||
|
||||
int code() const { return m_code; }
|
||||
const HashMap<String, String>& headers() const { return m_headers; }
|
||||
|
||||
private:
|
||||
GHttpResponse(int code, ByteBuffer&&);
|
||||
|
||||
int m_code { 0 };
|
||||
HashMap<String, String> m_headers;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue