UrlParser

Overview

The UrlParser class represents a URL string and its separate components. You can assign a full string such as

http://www.remobjects.com:81/test.asp?query=something

to the UrlParser via the Url property, or access the separate parts of the URL via the individual properties:

Location

 

constructor

 

constructor

 

UrlParser()

 

Sub New()

constructor (String)

 

constructor(url: String)

 

UrlParser(String url)

 

Sub New(url As String)

Parameters:

  • url:

Hostname

Hostname portion of the URL ("www.remobjects.com" in the sample above).

 

property Hostname: String read write;

 

String Hostname { get; set; }

 

Property Hostname() As String

HostnameAndPort

Combined Hostname and Port of the URL ("www.remobjects.com:81" in the sample above). The Port and the separating colon will only be included if the Port value is different from the default port for the specified protocol.

 

property HostnameAndPort: String read;

 

String HostnameAndPort { get; }

 

ReadOnly Property HostnameAndPort() As String

Params

Parameters portion of the URL ("query=something" in the sample above).

 

property Params: String read write;

 

String Params { get; set; }

 

Property Params() As String

Parse

 

method Parse(url: String)

 

void Parse(String url)

 

Sub Parse(url As String)

Parameters:

  • url:

Path

Path portion of the URL ("/test.asp in the sample above).

 

property Path: String read write;

 

String Path { get; set; }

 

Property Path() As String

PathAndParams

Combined Path and Parameters of the URL ("test.pas?query=something" in the sample above). The Parameters and the separating questionmark will only be included if the Params value is assigned.

 

property PathAndParams: String read;

 

String PathAndParams { get; }

 

ReadOnly Property PathAndParams() As String

Port

Port portion of the URL ("81" in the sample above).

 

property Port: Int32 read write;

 

Int32 Port { get; set; }

 

Property Port() As Int32

Protocol

Protocol portion of the URL ("http://" in the sample above).

 

property Protocol: String read write;

 

String Protocol { get; set; }

 

Property Protocol() As String

ToString

 

method ToString: String

 

String ToString()

 

Function ToString() As String

Url

The full URL. Only the relevant parts of the URL will be included; the Port will be omitted if it is equal to the default for the specified Protocol, Path and Params will be omitted if they are not assigned.

 

property Url: String read write;

 

String Url { get; set; }

 

Property Url() As String

 

Hostname

Hostname portion of the URL ("www.remobjects.com" in the sample above).

 

property Hostname: String read write;

 

String Hostname { get; set; }

 

Property Hostname() As String

HostnameAndPort

Combined Hostname and Port of the URL ("www.remobjects.com:81" in the sample above). The Port and the separating colon will only be included if the Port value is different from the default port for the specified protocol.

 

property HostnameAndPort: String read;

 

String HostnameAndPort { get; }

 

ReadOnly Property HostnameAndPort() As String

Params

Parameters portion of the URL ("query=something" in the sample above).

 

property Params: String read write;

 

String Params { get; set; }

 

Property Params() As String

Path

Path portion of the URL ("/test.asp in the sample above).

 

property Path: String read write;

 

String Path { get; set; }

 

Property Path() As String

PathAndParams

Combined Path and Parameters of the URL ("test.pas?query=something" in the sample above). The Parameters and the separating questionmark will only be included if the Params value is assigned.

 

property PathAndParams: String read;

 

String PathAndParams { get; }

 

ReadOnly Property PathAndParams() As String

Port

Port portion of the URL ("81" in the sample above).

 

property Port: Int32 read write;

 

Int32 Port { get; set; }

 

Property Port() As Int32

Protocol

Protocol portion of the URL ("http://" in the sample above).

 

property Protocol: String read write;

 

String Protocol { get; set; }

 

Property Protocol() As String

Url

The full URL. Only the relevant parts of the URL will be included; the Port will be omitted if it is equal to the default for the specified Protocol, Path and Params will be omitted if they are not assigned.

 

property Url: String read write;

 

String Url { get; set; }

 

Property Url() As String

 

constructor

 

constructor

 

UrlParser()

 

Sub New()

constructor (String)

 

constructor(url: String)

 

UrlParser(String url)

 

Sub New(url As String)

Parameters:

  • url:

Parse

 

method Parse(url: String)

 

void Parse(String url)

 

Sub Parse(url As String)

Parameters:

  • url:

ToString

 

method ToString: String

 

String ToString()

 

Function ToString() As String