Class: SockJS::Transports::XHRPost
- Inherits:
-
PollingConsumingTransport
- Object
- Endpoint
- SessionEndpoint
- SockJS::Transport
- ConsumingTransport
- PollingConsumingTransport
- SockJS::Transports::XHRPost
- Defined in:
- lib/sockjs/transports/xhr.rb
Instance Attribute Summary
Attributes inherited from Endpoint
#connection, #http_origin, #options, #remote_addr
Attributes included from Endpoint::ClassMethods
Instance Method Summary collapse
Methods inherited from PollingConsumingTransport
Methods inherited from ConsumingTransport
#closing_frame, #finish_response, #format_frame, #get_session, #heartbeat_frame, #messages_frame, #opening_frame, #process_session, #request_closed, #send_data
Methods inherited from SockJS::Transport
#exception_response, #handle_request, #handle_session_unavailable, #request_data, #response_beginning, #server_key, #session_key
Methods inherited from SessionEndpoint
Methods inherited from Endpoint
#build_error_response, #build_response, #call, #empty_string, #error_content_type, #format_frame, #handle, #handle_http_error, #handle_request, #initialize, #inspect, #response_class
Methods included from Endpoint::ClassMethods
#add_route, #add_routes, #endpoints, #register, #route_conditions, #routing_prefix
Constructor Details
This class inherits a constructor from SockJS::Endpoint
Instance Method Details
#setup_response(request, response) ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/sockjs/transports/xhr.rb', line 43 def setup_response(request, response) response.status = 200 response.set_content_type(:javascript) response.set_access_control(request.origin) response.set_session_id(request.session_id) response end |