mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:37:45 +00:00
Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
This commit is contained in:
parent
63814ffebf
commit
04b9dc2d30
328 changed files with 36 additions and 36 deletions
39
Libraries/LibCore/CHttpRequest.h
Normal file
39
Libraries/LibCore/CHttpRequest.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/AKString.h>
|
||||
|
||||
class CNetworkJob;
|
||||
|
||||
class CHttpRequest {
|
||||
public:
|
||||
enum Method {
|
||||
Invalid,
|
||||
HEAD,
|
||||
GET,
|
||||
POST
|
||||
};
|
||||
|
||||
CHttpRequest();
|
||||
~CHttpRequest();
|
||||
|
||||
String hostname() const { return m_hostname; }
|
||||
int port() const { return m_port; }
|
||||
String path() const { return m_path; }
|
||||
Method method() const { return m_method; }
|
||||
|
||||
void set_hostname(const String& hostname) { m_hostname = hostname; }
|
||||
void set_port(int port) { m_port = port; }
|
||||
void set_path(const String& path) { m_path = path; }
|
||||
void set_method(Method method) { m_method = method; }
|
||||
|
||||
String method_name() const;
|
||||
ByteBuffer to_raw_request() const;
|
||||
|
||||
CNetworkJob* schedule();
|
||||
|
||||
private:
|
||||
String m_hostname;
|
||||
String m_path;
|
||||
int m_port { 80 };
|
||||
Method m_method { GET };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue