URL

com.akifox.asynchttp.URL (Class)

##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 Members

isSsl: Bool

Tells if the URL use an SSL protocol


isHttp: Bool

Tells if the URL use an HTTP(S) protocol


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)


protocol: String

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


port: Int

The port (ie:80)


host: String

The host (ie:google.com)


resource: String

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


querystring: String

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


toString(): String
Returns
String

clone(): URL

Deep copy of the URL

Returns
URL

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)

Name Type
url URL
Returns
URL

new(urlString: String): Void

Class instance

Name Type Description
urlString String An URL string in standard format "protocol://host:port/resource?querystring"

Private Members

regexURL: EReg

mergeResources(resNew: String, ?resOriginal: String = ""): String
Name Type Default
resNew String
resOriginal String ""
Returns
String