func (c *Client) PostSessionChunk(sid session.ID, reader io.Reader) error {
	r, err := http.NewRequest("POST", c.Endpoint("sessions", string(sid), "stream"), reader)
	if err != nil {
		return trace.Wrap(err)
	}
	r.Header.Set("Content-Type", "application/octet-stream")
	c.Client.SetAuthHeader(r.Header)
	re, err := c.Client.HTTPClient().Do(r)
	if err != nil {
		return trace.Wrap(err)
	}
	// we **must** consume response by reading all of its body, otherwise the http
	// client will allocate a new connection for subsequent requests
	defer re.Body.Close()
	var buff [1024]byte
	io.CopyBuffer(ioutil.Discard, re.Body, buff[:])
	return nil
}
// PostSessionChunk allows clients to submit session stream chunks to the audit log
// (part of evets.IAuditLog interface)
//
// The data is POSTed to HTTP server as a simple binary body (no encodings of any
// kind are needed)
PostSessionChunk allows clients to submit session stream chunks to the audit log
(part of evets.IAuditLog interface)

The data is POSTed to HTTP server as a simple binary body (no encodings of any
kind are needed)
// PostSessionChunk allows clients to submit session stream chunks to the audit log // ( part of evets . IAuditLog interface ) // // The data is POSTed to HTTP server as a simple binary body ( no encodings of any // kind are needed )
func (c *Client) PostSessionChunk(sid session.ID, reader io.Reader) error {
	r, err := http.NewRequest("POST", c.Endpoint("sessions", string(sid), "stream"), reader)
	if err != nil {
		return trace.Wrap(err)
	}
	r.Header.Set("Content-Type", "application/octet-stream")
	c.Client.SetAuthHeader(r.Header)
	re, err := c.Client.HTTPClient().Do(r)
	if err != nil {
		return trace.Wrap(err)
	}
	defer re.Body.Close()
	var buff [1024]byte
	io.CopyBuffer(ioutil.Discard, re.Body, buff[:])
	return nil
}
func ( c * Client ) PostSessionChunk ( sid session . ID , reader io . Reader ) error { r , err := http . NewRequest ( " " , c . Endpoint ( " " , string ( sid ) , " " ) , reader ) if err != nil { return trace . Wrap ( err ) } r . Header . Set ( " " , " " ) c . Client . SetAuthHeader ( r . Header ) re , err := c . Client . HTTPClient ( ) . Do ( r ) if err != nil { return trace . Wrap ( err ) } defer re . Body . Close ( ) var buff [ 1024 ] byte io . CopyBuffer ( ioutil . Discard , re . Body , buff [ : ] ) return nil }
PostSessionChunk allows clients to submit session stream chunks to the audit log
(part of evets.IAuditLog interface)
PostSessionChunk allows clients to submit session stream chunks to the audit log ( part of evets . IAuditLog interface )
// we **must** consume response by reading all of its body, otherwise the http // client will allocate a new connection for subsequent requests