(req *http.Request)
| 313 | } |
| 314 | |
| 315 | func (x *XHRSession) do(req *http.Request) <-chan doResult { |
| 316 | ch := make(chan doResult, 1) |
| 317 | |
| 318 | go func() { |
| 319 | var res doResult |
| 320 | res.Response, res.Error = x.client.Do(req) |
| 321 | ch <- res |
| 322 | }() |
| 323 | |
| 324 | return ch |
| 325 | } |
| 326 | |
| 327 | type frameReader struct { |
| 328 | r *bufio.Reader |