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

function clone():URL

Deep copy of the URL

Returns:

A new URL

var host(get,null):String

The host (ie: google.com)

var isHttp(get,null):Bool

Tells if the URL use an HTTP(S) protocol

var isRelative(get,null):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(get,null):Bool

Tells if the URL use an SSL protocol

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)

Parameters:
URL

to be merged with

Returns:

This URL

function new(urlString:String):Void

Class instance

Parameters:
urlString

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

var port(get,null):Int

The port (ie: 80)

var protocol(get,null):String

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

var querystring(get,null):String

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

var resource(get,null):String

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

function toString():String

Returns:

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