NewXHRSession returns a new XHRSession, a SockJS client which supports xhr-polling: http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-74 Deprecated: Use DialXHR instead.
(opts *DialOptions)
| 89 | // |
| 90 | // Deprecated: Use DialXHR instead. |
| 91 | func NewXHRSession(opts *DialOptions) (*XHRSession, error) { |
| 92 | cfg := config.New() |
| 93 | cfg.XHR = opts.client() |
| 94 | |
| 95 | return DialXHR(opts.BaseURL, cfg) |
| 96 | } |
| 97 | |
| 98 | func (x *XHRSession) ID() string { |
| 99 | return x.sessionID |