1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 01:05:06 +00:00
serenity/Libraries/LibCore/CHttpRequest.h
Andreas Kling 73fdbba59c AK: Rename <AK/AKString.h> to <AK/String.h>
This was a workaround to be able to build on case-insensitive file
systems where it might get confused about <string.h> vs <String.h>.

Let's just not support building that way, so String.h can have an
objectively nicer name. :^)
2019-09-06 15:36:54 +02:00

34 lines
592 B
C++

#pragma once
#include <AK/String.h>
#include <AK/URL.h>
class CNetworkJob;
class CHttpRequest {
public:
enum Method {
Invalid,
HEAD,
GET,
POST
};
CHttpRequest();
~CHttpRequest();
const URL& url() const { return m_url; }
void set_url(const URL& url) { m_url = url; }
Method method() const { return m_method; }
void set_method(Method method) { m_method = method; }
String method_name() const;
ByteBuffer to_raw_request() const;
CNetworkJob* schedule();
private:
URL m_url;
Method m_method { GET };
};