mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-02 09:49:48 +02:00
indentation style fix
This commit is contained in:
parent
d2472efcfb
commit
427a9bc4e4
@ -69,17 +69,17 @@ int main(int argc, char** argv)
|
|||||||
std::string path(uri.getPathAndQuery());
|
std::string path(uri.getPathAndQuery());
|
||||||
if (path.empty()) path = "/";
|
if (path.empty()) path = "/";
|
||||||
|
|
||||||
std::string username;
|
std::string username;
|
||||||
std::string password;
|
std::string password;
|
||||||
Poco::Net::HTTPCredentials::extractCredentials(uri, username, password);
|
Poco::Net::HTTPCredentials::extractCredentials(uri, username, password);
|
||||||
Poco::Net::HTTPCredentials credentials(username, password);
|
Poco::Net::HTTPCredentials credentials(username, password);
|
||||||
|
|
||||||
HTTPClientSession session(uri.getHost(), uri.getPort());
|
HTTPClientSession session(uri.getHost(), uri.getPort());
|
||||||
HTTPRequest request(HTTPRequest::HTTP_GET, path, HTTPMessage::HTTP_1_1);
|
HTTPRequest request(HTTPRequest::HTTP_GET, path, HTTPMessage::HTTP_1_1);
|
||||||
HTTPResponse response;
|
HTTPResponse response;
|
||||||
if (!doRequest(session, request, response))
|
if (!doRequest(session, request, response))
|
||||||
{
|
{
|
||||||
credentials.authenticate(request, response);
|
credentials.authenticate(request, response);
|
||||||
if (!doRequest(session, request, response))
|
if (!doRequest(session, request, response))
|
||||||
{
|
{
|
||||||
std::cerr << "Invalid username or password" << std::endl;
|
std::cerr << "Invalid username or password" << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user