Source code

CERNY.http.Response

Provides a wrapper around a HTTP response.

Uses

None

Functions

Response

This class represents the HTTP response. A response must have a status.

request (CERNY.http.Request) : the request that belongs to this response
return (object) : an instance of this class
getBody

Return the body of this response.

return (string) : the response body
getHeader

Return a header of the response.

name (string) : the name of the header to return
return (string) : the value of the response header
getStatus

Return the status of this response.

return (number) : the response status
getValue

Interpret the body of the response as a JSON document and return the evaluation result.

return (any) : the value of the JSON document in the body

History

2007-12-08 : Created.

API Documentation for version

2.0

Scripts

Scripts

Request Response

2.0

Functions