eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTTPInterface::HTTPResponse':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: HTTPResponse (private in HTTPInterface

This class is only visible from within HTTPInterface.

Inheritance:

   Object
   |
   +--HTTPInterface::HTTPResponse
      |
      +--HTTPInterface::WebSocketResponse

Package:
stx:goodies/communication
Category:
Net-Communication-HTTP-Client
Owner:
HTTPInterface
Author:
Stefan Vogel

Description:


documentation to be added.


[instance variables:]

[class variables:]


Related information:



Class protocol:

instance creation
o  error: errCode
create a synthetic error response.
Done for errors happening here (i.e. not generated by a contacted server);
for example: unknown host, etc.

o  error: errCode responseText: textOrNil
create a synthetic error response.
Done for errors happening here (i.e. not generated by a contacted server);
for example: unknown host, etc.


Instance protocol:

Compatibility-Squeak
o  contents
for squeak ZnRequest compatibility

o  headers
for squeak ZnRequest compatibility

o  status
for squeak ZnRequest compatibility

accessing
o  contentType

o  contentType: something

o  data
return the data converted to a string and decoded by the encoding.
If you need the undecoded bytes, please use #rawData

usage example(s):

^ data

o  data: something

o  dataFile

o  dataFile: something

o  dataFromFileOrData
returns the data either from the data file (which is used if too big) or data directly

o  dataStream
in preparation for a future stream interface (i.e. not loading the data into memory
and returning it, but instead return a stream directly reading from the socket),
use this interface.
However, it is currently not yet avoiding big garbage data in memory.

o  encoding

o  encoding: something

o  headerInfo

o  headerInfo: something

o  headerInfoAt: aKeyString
get the header info for aKeyString (alway lower case)

o  mimeType

o  mimeType: something

o  mimeType: mimeTypeArg encoding: encodingArg data: dataArg
soon obsolete

o  mimeType: mimeTypeArg encoding: encodingArg rawData: dataArg

o  peerAddress

o  peerAddress: something

o  rawData
return the data as bytes, as they were received (no decoding by character set, etc)

o  rawData: aByteArray

o  rawHeader

o  rawHeader: something

o  rawHeader: rawHeaderString infoHeader: parsedheader data: dataBytes

o  response

o  response: something

o  responseCode

o  responseCode: anInteger
anInteger >= 500 ifTrue:[self breakPoint:#cg].

o  responseText
answer the text returned with the response, or the empty string

o  responseText: something

o  socketAddress

o  socketAddress: something

o  suppressUnicode

o  suppressUnicode: aBoolean
set this to true to return only single-byte strings as data

o  url

o  url: something

inspecting
o  inspectorExtraAttributes

parsing
o  setupFromRawHeader: rawHeaderArg

printing
o  printOn: aStream
(comment from inherited method)
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.

The default here is to output the receiver's class name.
BUT: this method is heavily redefined for objects which
can print prettier.

queries
o  date

o  expires

o  isErrorResponse
return true, if this is an error-response

o  isFileErrorResponse
return true, if this is a file-error-response

o  isMovedResponse

o  location



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Wed, 10 Aug 2022 10:52:46 GMT