1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-03-04 03:07:29 +01:00
Sandu Liviu Catalin 4a6bfc086c Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
2021-01-30 08:51:39 +02:00

39 lines
862 B
C++

//
// URI.cpp
//
// This sample demonstrates the URI class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/URI.h"
#include <iostream>
using Poco::URI;
int main(int argc, char** argv)
{
URI uri1("http://www.appinf.com:81/sample?example-query#somewhere");
std::cout << "Scheme: " << uri1.getScheme() << std::endl
<< "Authority: " << uri1.getAuthority() << std::endl
<< "Path: " << uri1.getPath() << std::endl
<< "Query: " << uri1.getQuery() << std::endl
<< "Fragment: " << uri1.getFragment() << std::endl;
URI uri2;
uri2.setScheme("https");
uri2.setAuthority("www.appinf.com");
uri2.setPath("/another sample");
std::cout << uri2.toString() << std::endl;
return 0;
}