Skip to content

Latest commit

 

History

History
154 lines (95 loc) · 2.56 KB

Response.md

File metadata and controls

154 lines (95 loc) · 2.56 KB

API categories | API index

Response (object)

This object is passed as parameter to RequestHandler.OnBeforeResourceLoad().

Table of contents:

Methods

IsReadOnly

Return bool

Returns true if this object is read-only.

GetStatus

Return int

Get the response status code.

SetStatus

Parameter Type
status int
Return void

Set the response status code.

GetStatusText

Return string

Get the response status text.

SetStatusText

Parameter Type
statusText string
Return void

Set the response status text.

GetMimeType

Return string

Get the response mime type.

SetMimeType

Parameter Type
mimeType string
Return void

Set the response mime type.

GetHeaderByName

Parameter Type
name string
Return string

Get the value for the specified response header field.

SetHeaderByName

Parameter Type
name string
value string
override bool
Return void

Set the header |name| to |value|. If |overwrite| is true any existing values will be replaced with the new value. If |overwrite| is false any existing values will not be overwritten.

GetHeaderMap

Parameter Type
Return dict

Get all header fields with duplicate keys overwritten by last.

GetHeaderMultimap

Parameter Type
Return list

Get all header fields. Returns list of tuples (name, value). Headers may have duplicate keys, if you want to ignore duplicates use GetHeaderMap().

SetHeaderMap

Parameter Type
headerMap dict
Return void

Set all header fields.

SetHeaderMultimap

Parameter Type
headerMultimap list
Return void

Set all header fields. headerMultimap must be a list of tuples (name, value).