func()

in bayeux.go [141:156]


func (b *Bayeux) call(ctx context.Context, body string, route string) (resp *http.Response, e error) {
	req, err := b.newHTTPRequest(ctx, body, route)
	if err != nil {
		return nil, err
	}

	client := &http.Client{}
	resp, err = client.Do(req)
	if err == io.EOF {
		// Right way to handle EOF?
		return nil, fmt.Errorf("bad bayeuxCall io.EOF: %w", err)
	} else if err != nil {
		return nil, fmt.Errorf("bad unrecoverable call: %w", err)
	}
	return resp, nil
}