2022-05-21 19:58:09 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <memory>
|
|
|
|
#include "StringBase.h"
|
|
|
|
#include "InternetPortType.h"
|
|
|
|
|
|
|
|
namespace Net
|
|
|
|
{
|
|
|
|
// Represents a parsed Url with all components required for a WebRequest
|
|
|
|
class Uri
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit Uri(const char* Url);
|
2022-05-21 21:51:35 +02:00
|
|
|
Uri(const String& Url);
|
2022-05-21 19:58:09 +02:00
|
|
|
|
|
|
|
// Returns the internet port of the Uri
|
|
|
|
InternetPortType InternetPort;
|
|
|
|
// Returns the host name of the Uri
|
2022-05-21 21:51:35 +02:00
|
|
|
String Host;
|
2022-05-21 19:58:09 +02:00
|
|
|
// Returns the full path and query of the Uri
|
2022-05-21 21:51:35 +02:00
|
|
|
String Path;
|
2022-05-21 19:58:09 +02:00
|
|
|
|
|
|
|
// Returns the fully built url of the Uri components
|
2022-05-21 21:51:35 +02:00
|
|
|
String GetUrl();
|
2022-05-21 19:58:09 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
// Internal routine to parse a Uri
|
2022-05-21 21:51:35 +02:00
|
|
|
void ParseUri(const String& Url);
|
2022-05-21 19:58:09 +02:00
|
|
|
};
|
|
|
|
}
|