Category: NetClients-URIResolver
Superclass: Object
Copyright (c) Kazuki Yasumatsu, 1995. All rights reserved.

Method category index

encoding URLs (class)
instance creation (class)
accessing (instance)
comparing (instance)
copying (instance)
initialize-release (instance)
printing (instance)
still unclassified (instance)
testing (instance)
utilities (instance)

encoding URLs (class)

decode: aString
Decode a text/x-www-form-urlencoded String into a text/plain String.

encode: anURL

Encode a text/plain into a text/x-www-form-urlencoded String (those things with lots of % in them).

initialize

Initialize the receiver's class variables.

top


instance creation (class)

fromString: aString
Parse the given URL and answer an URL object based on it.

scheme: schemeString host: hostString path: pathString

Answer an URL object made from all the parts passed as arguments.

scheme: schemeString host: hostString port: portNumber path: pathString

Answer an URL object made from all the parts passed as arguments.

scheme: schemeString path: pathString

Answer an URL object made from all the parts passed as arguments.

scheme: schemeString username: userString password: passwordString host: hostString port: portNumber path: pathString

Answer an URL object made from all the parts passed as arguments.

top


accessing (instance)

asString
Answer the full request string corresponding to the URL. This is how the URL would be printed in the address bar of a web browser, except that the query data is printed even if it is to be sent through a POST request.

decodedFields

Convert the form fields to a Dictionary, answer nil if no question mark is found in the URL.

decodedFile

Answer the file part of the URL, decoding it from x-www-form-urlencoded format.

decodedFragment

Answer the fragment part of the URL, decoding it from x-www-form-urlencoded format.

fragment

Answer the fragment part of the URL, leaving it in x-www-form-urlencoded format.

fragment: aString

Set the fragment part of the URL, which should be in x-www-form-urlencoded format.

fullRequestString

Answer the full request string corresponding to the URL. This is how the URL would be printed in the address bar of a web browser, except that the query data is printed even if it is to be sent through a POST request.

hasPostData

Answer whether the URL has a query part but is actually for an HTTP POST request and not really part of the URL (as it would be for the HTTP GET request).

hasPostData: aBoolean

Set whether the query part of the URL is actually the data for an HTTP POST request and not really part of the URL (as it would be for the HTTP GET request).

host

Answer the host part of the URL.

host: aString

Set the host part of the URL to aString.

newsGroup

If the receiver is an nntp url, return the news group.

password

Answer the password part of the URL.

password: aString

Set the password part of the URL to aString.

path

Answer the path part of the URL.

path: aString

Set the path part of the URL to aString.

port

Answer the port number part of the URL.

port: anInteger

Set the port number part of the URL to anInteger.

postData

Answer whether the URL has a query part and it is meant for an HTTP POST request, answer it. Else answer nil.

postData: aString

Associate to the URL some data that is meant to be sent through an HTTP POST request, answer it.

query

Answer the query data associated to the URL.

query: aString

Set the query data associated to the URL to aString.

requestString

Answer the URL as it would be sent in an HTTP stream (that is, the path and the query data, the latter only if it is to be sent with an HTTP POST request).

scheme

Answer the URL's scheme.

scheme: aString

Set the URL's scheme to be aString.

username

Answer the username part of the URL.

username: aString

Set the username part of the URL to aString.

top


comparing (instance)

= anURL
Answer whether the two URLs are equal. The file and anchor are converted to full 8-bit ASCII (contrast with urlencoded) and the comparison is case-sensitive; on the other hand, the protocol and host are compared without regard to case.

hash

Answer an hash value for the receiver

top


copying (instance)

copyWithoutAuxiliaryParts
Answer a copy of the receiver where the fragment and query parts of the URL have been cleared.

copyWithoutFragment

Answer a copy of the receiver where the fragment parts of the URL has been cleared.

postCopy

All the variables are copied when an URL object is copied.

top


initialize-release (instance)

initialize
Initialize the object to a consistent state.

top


printing (instance)

printOn: stream
Print a representation of the URL on the given stream.

top


still unclassified (instance)

contents
Not commented.

entity

Not commented.

readStream

Not commented.

top


testing (instance)

canCache
Answer whether the URL is cacheable. The current implementation considers file URLs not to be cacheable, and everything else to be.

hasFragment

Answer whether the URL points to a particular fragment (anchor) of the resource.

hasQuery

Answer whether the URL includes query arguments to be submitted when retrieving the resource.

isFileScheme

Answer whether the URL is a file URL.

isFragmentOnly

Answer whether the URL only includes the name of a particular fragment (anchor) of the resource to which it refers.

top


utilities (instance)

construct: anURL
Construct an absolute URL based on the relative URL anURL and the base path represented by the receiver

top