-
Notifications
You must be signed in to change notification settings - Fork 3
kiwi.net.URL
Nikos Siatras edited this page Nov 1, 2022
·
3 revisions
The URL class represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web. A resource can be directory, or it can be a reference to a more complicated object, such as a query to a database or to a search engine.
function URL.getHost() as String
Get the host part of this URL.
@return the authority part of this URL
Example Code:
#include once "kiwi\kiwi.bi"
#include once "kiwi\net.bi"
Dim address as URL = URL("https://freebasic.net/wiki/DocToc")
print "Host:" & address.getHost()
Output:
freebasic.net
function URL.getPath() as String
Gets the path part of this URL.
@return the path part of this URL, or an empty string if one does not exist
Example Code:
#include once "kiwi\kiwi.bi"
#include once "kiwi\net.bi"
Dim address as URL = URL("https://freebasic.net/wiki/DocToc")
print "Path:" & address.getPath()
Output:
/wiki/DocToc
function URL.getProtocol() as String
Gets the protocol name of this URL.
@return the protocol of this URL.
Example Code:
#include once "kiwi\kiwi.bi"
#include once "kiwi\net.bi"
Dim address as URL = URL("https://freebasic.net/wiki/DocToc")
print "Protocol:" & address.getProtocol()
Output:
https
- MySQL/MariaDB - Coming to v1.0.2
- ArrayList
- Comparator
- HashMap - Coming to v1.0.2
- Queue