mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -29,8 +29,8 @@ public:
|
|||
const AK::URL& url() const { return m_url; }
|
||||
void set_url(const AK::URL& url) { m_url = url; }
|
||||
|
||||
String const& method() const { return m_method; }
|
||||
void set_method(String const& method) { m_method = method; }
|
||||
DeprecatedString const& method() const { return m_method; }
|
||||
void set_method(DeprecatedString const& method) { m_method = method; }
|
||||
|
||||
ByteBuffer const& body() const { return m_body; }
|
||||
void set_body(ByteBuffer body) { m_body = move(body); }
|
||||
|
@ -63,15 +63,15 @@ public:
|
|||
return m_url == other.m_url && m_method == other.m_method && m_body == other.m_body;
|
||||
}
|
||||
|
||||
void set_header(String const& name, String const& value) { m_headers.set(name, value); }
|
||||
String header(String const& name) const { return m_headers.get(name).value_or({}); }
|
||||
void set_header(DeprecatedString const& name, DeprecatedString const& value) { m_headers.set(name, value); }
|
||||
DeprecatedString header(DeprecatedString const& name) const { return m_headers.get(name).value_or({}); }
|
||||
|
||||
HashMap<String, String, CaseInsensitiveStringTraits> const& headers() const { return m_headers; }
|
||||
HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> const& headers() const { return m_headers; }
|
||||
|
||||
private:
|
||||
AK::URL m_url;
|
||||
String m_method { "GET" };
|
||||
HashMap<String, String, CaseInsensitiveStringTraits> m_headers;
|
||||
DeprecatedString m_method { "GET" };
|
||||
HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> m_headers;
|
||||
ByteBuffer m_body;
|
||||
Core::ElapsedTimer m_load_timer;
|
||||
Optional<Page&> m_page;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue