func DoPostChunked(c *http.Client, url string, contentType string, body io.Reader, onChunk func([]byte)) error {
	req, e := http.NewRequest("POST", url, body)
	if e != nil {
		return e
	}
	req.Header.Set("Content-Type", contentType)
	req.Header.Set("Authorization", "Bearer "+GetAuthToken())

	r, e := c.Do(req)
	if e != nil {
		return e
	}
	defer r.Body.Close()

	var m int
	buf := make([]byte, 4096)
	for {
		m, e = r.Body.Read(buf)
		if m < 0 || e != nil {
			break
		}
		onChunk(buf[:m])
	}

	if r.StatusCode == 200 {
		return nil
	}
	return e
}
// DoPostChunked is a wrapper around performing HTTP POST requests that stream chunked data
DoPostChunked is a wrapper around performing HTTP POST requests that stream chunked data
// DoPostChunked is a wrapper around performing HTTP POST requests that stream chunked data
func DoPostChunked(c *http.Client, url string, contentType string, body io.Reader, onChunk func([]byte)) error {
	req, e := http.NewRequest("POST", url, body)
	if e != nil {
		return e
	}
	req.Header.Set("Content-Type", contentType)
	req.Header.Set("Authorization", "Bearer "+GetAuthToken())
	r, e := c.Do(req)
	if e != nil {
		return e
	}
	defer r.Body.Close()
	var m int
	buf := make([]byte, 4096)
	for {
		m, e = r.Body.Read(buf)
		if m < 0 || e != nil {
			break
		}
		onChunk(buf[:m])
	}
	if r.StatusCode == 200 {
		return nil
	}
	return e
}
func DoPostChunked ( c * http . Client , url string , contentType string , body io . Reader , onChunk func ( [ ] byte ) ) error { req , e := http . NewRequest ( " " , url , body ) if e != nil { return e } req . Header . Set ( " " , contentType ) req . Header . Set ( " " , " " + GetAuthToken ( ) ) r , e := c . Do ( req ) if e != nil { return e } defer r . Body . Close ( ) var m int buf := make ( [ ] byte , 4096 ) for { m , e = r . Body . Read ( buf ) if m < 0 || e != nil { break } onChunk ( buf [ : m ] ) } if r . StatusCode == 200 { return nil } return e }
DoPostChunked is a wrapper around performing HTTP POST requests that stream chunked data
DoPostChunked is a wrapper around performing HTTP POST requests that stream chunked data