mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +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:
@@ -27,8 +27,7 @@ void ThreadCatalogModel::set_board(const String& board)
|
||||
void ThreadCatalogModel::update()
|
||||
{
|
||||
CHttpRequest request;
|
||||
request.set_hostname("a.4cdn.org");
|
||||
request.set_path(String::format("/%s/catalog.json", m_board.characters()));
|
||||
request.set_url(String::format("http://a.4cdn.org/%s/catalog.json", m_board.characters()));
|
||||
|
||||
auto* job = request.schedule();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user