Libraries anvil net URLConnection

class URLConnection
extends anvil.lang.object
Represents a communications link between the application and a URL. Instances of this class can be used both to read from and to write to the resource referenced by the URL.

Methods

boolean connect()
Connects to target, if not yet connected.
Throws IOError -  If an IO error occured

string getContentEncoding()
Returns the value of the content-encoding header field.

int getContentLength()
Returns the value of the content-length header field.

string getContentType()
Returns the value of the content-type header field.

Calendar getDate()
Returns the value of the date header field.

boolean getDoInput()
Returns the value of input flag.

boolean getDoOutput()
Returns the value of output flag.

InputStream getError()
Returns error stream if connection failed but the server sent useful data nonetheless.

Calendar getExpiration()

Calendar getIfModifiedSince()

InputStream getInput()
Returns input stream for reading from this connection.
Throws IOError -  If an IO error occured

Calendar getLastModified()
Returns the value of the ast-modified field.

OutputStream getOutput()
Returns output stream for writing to this connection.
Throws IOError -  If an IO error occured

string getRequestMethod()
Returns the HTTP request method.

int getResponseCode()
Returns the HTTP response code
Throws IOError -  If an IO error occured

string getResponseMessage()
Returns the HTTP response message.
Throws IOError -  If an IO error occured

URL getURL()
Returns the URL into which this connection points to.

void setDoInput(boolean doInput)
Sets the input flag.

void setDoOutput(boolean doOutput)
Sets the output flag.

Calendar getIfModifiedSince(int time)
Calendar getIfModifiedSince(Calendar time)