Skip to content

Latest commit

 

History

History
139 lines (84 loc) · 2.22 KB

Response.md

File metadata and controls

139 lines (84 loc) · 2.22 KB

API categories | API index

Response (object)

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

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.

GetHeader

Parameter Type
name string
Return string

Get the value for the specified response header field.

GetHeaderMap

Return dict

Get all header fields with duplicate keys overwritten by last.

GetHeaderMultimap

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).