Back: NetClients.URIResolver class-instance creation Up: Base classes Forward: NetClients.URL class-encoding URLs   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.115 NetClients.URL

Defined in namespace Smalltalk.NetClients
Superclass: Object
Category: NetClients-URIResolver

Copyright (c) Kazuki Yasumatsu, 1995. All rights reserved.

1.115.1 NetClients.URL class: encoding URLs  (class)
1.115.2 NetClients.URL class: instance creation  (class)
1.115.3 NetClients.URL: accessing  (instance)
1.115.4 NetClients.URL: comparing  (instance)
1.115.5 NetClients.URL: copying  (instance)
1.115.6 NetClients.URL: initialize-release  (instance)
1.115.7 NetClients.URL: printing  (instance)
1.115.8 NetClients.URL: still unclassified  (instance)
1.115.9 NetClients.URL: testing  (instance)
1.115.10 NetClients.URL: utilities  (instance)


1.115.1 NetClients.URL class: encoding URLs

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.


1.115.2 NetClients.URL class: instance creation

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

new
Answer a 'blank' URL.

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.


1.115.3 NetClients.URL: accessing

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.


1.115.4 NetClients.URL: comparing

= 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


1.115.5 NetClients.URL: copying

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.


1.115.6 NetClients.URL: initialize-release

initialize
Initialize the object to a consistent state.


1.115.7 NetClients.URL: printing

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


1.115.8 NetClients.URL: still unclassified

contents
Not commented.

readStream
Not commented.


1.115.9 NetClients.URL: testing

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.


1.115.10 NetClients.URL: utilities

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



Back: NetClients.URL-testing Up: NetClients.URL Forward: Notification   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on July, 23 2009 using texi2html