Class: Wx::WEB::WebViewHandlerResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/web/web_view_handler.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

A class giving access to various webview response parameters.

Usually a web_view_handler would set various parameters required for the response like HTTP status, various headers and must then call #finish to complete the response or call #finish_with_error to abort the request.

Category: WebView

See Also:

Requires:

  • USE_WEBVIEW

Instance Method Summary collapse

Instance Method Details

#finish(data) ⇒ void #finish(text, conv = wxConvUTF8) ⇒ void

Overloads:

  • #finish(data) ⇒ void

    This method returns an undefined value.

    Finishes the request with binary data.

    Parameters:

    See Also:

    • conv)
  • #finish(text, conv = wxConvUTF8) ⇒ void

    This method returns an undefined value.

    Finishes the request with text data.

    Parameters:

    • text (String)

      Text content of the response (can be empty)

    • conv (Wx::MBConv) (defaults to: wxConvUTF8)

      Conversion used when sending the text in the response

    See Also:

    • find(data)


285
# File 'lib/wx/doc/gen/web/web_view_handler.rb', line 285

def finish(*args) end

#finish_with_errorvoid

This method returns an undefined value.

Finishes the request as an error.

This will notify that the request could not produce any data.

See Also:



292
# File 'lib/wx/doc/gen/web/web_view_handler.rb', line 292

def finish_with_error; end

#set_content_type(contentType) ⇒ void Also known as: content_type=

This method returns an undefined value.

Sets the MIME type of the response.

Parameters:

  • contentType (String)

    MIME type of the response content



261
# File 'lib/wx/doc/gen/web/web_view_handler.rb', line 261

def set_content_type(contentType) end

#set_header(name, value) ⇒ void

This method returns an undefined value.

Sets a response header which will be sent to the web view.

The header will be added if it hasn't been set before or replaced otherwise.

Parameters:

  • name (String)

    Name of the header

  • value (String)

    String value of the header



270
# File 'lib/wx/doc/gen/web/web_view_handler.rb', line 270

def set_header(name, value) end

#set_status(status) ⇒ void Also known as: status=

This method returns an undefined value.

Sets the status code of the response.

Parameters:

  • status (Integer)

    HTTP status code



255
# File 'lib/wx/doc/gen/web/web_view_handler.rb', line 255

def set_status(status) end