MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / CreatePostRequest

Method CreatePostRequest

common/HTTPDownloader.cpp:57–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void HTTPDownloader::CreatePostRequest(std::string url, std::string post_data, Request::Callback callback, ProgressCallback* progress)
58{
59 Request* req = InternalCreateRequest();
60 req->parent = this;
61 req->type = Request::Type::Post;
62 req->url = std::move(url);
63 req->post_data = std::move(post_data);
64 req->callback = std::move(callback);
65 req->progress = progress;
66 req->start_time = Common::Timer::GetCurrentValue();
67
68 std::unique_lock<std::mutex> lock(m_pending_http_request_lock);
69 if (LockedGetActiveRequestCount() < m_max_active_requests)
70 {
71 if (!StartRequest(req))
72 return;
73 }
74
75 LockedAddRequest(req);
76}
77
78void HTTPDownloader::LockedPollRequests(std::unique_lock<std::mutex>& lock)
79{

Callers 1

ClientServerCallMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected