class com.akifox.asynchttp.URL

Available on all platforms

URL

This class represents an URL and it is used by the library to handle URLs

@repo akifox-asynchttp repository

@author Simone Cingano (yupswing) Akifox Studio

@licence MIT Licence

Instance Fields

var host:String

The host (ie: google.com)

var isHttp:Bool

Tells if the URL use an HTTP(S) protocol

var isRelative:Bool

Tells if the URL is relative (Only absolute URLs are complete. Any relative one needs to be merged with a complete to make it point to a resource)

var isSsl:Bool

Tells if the URL use an SSL protocol

var port:Int

The port (ie: 80)

var protocol:String

The protocol (ie: "http://")

var querystring:String

The querystring (ie: ?q=test&s=1)

var resource:String

The resource (ie: /search/index.html)

function new(urlString:String):Void

Class instance

urlString

An URL string in standard format "protocol://host:port/resource?querystring"

function clone():URL

Deep copy of the URL

returns

A new URL

function merge(url:URL):URL

Merge this URL with another one. If this URL is relative it will copy the missing parts from the given one, otherwise nothing will change. (this method is needed to make a relative URL complete)

URL

to be merged with

returns

This URL

function toString():String

returns

A string representation of the URL: "protocol://host:port/resource?querystring"