mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
LibCore: Use URL in CHttpRequest
Now there's just CHttpRequest::set_url(URL), no need to specify the host, port and path manually anymore. Updated ChanViewer and Downloader for the API change.
This commit is contained in:
parent
fb636389d6
commit
ee83b1bcf4
6 changed files with 11 additions and 19 deletions
|
@ -36,9 +36,9 @@ ByteBuffer CHttpRequest::to_raw_request() const
|
|||
StringBuilder builder;
|
||||
builder.append(method_name());
|
||||
builder.append(' ');
|
||||
builder.append(m_path);
|
||||
builder.append(m_url.path());
|
||||
builder.append(" HTTP/1.0\r\nHost: ");
|
||||
builder.append(m_hostname);
|
||||
builder.append(m_url.host());
|
||||
builder.append("\r\n\r\n");
|
||||
return builder.to_byte_buffer();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue