Documentation
¶
Overview ¶
Package api provides different types of functions for making http request and reading responses.
Index ¶
- Constants
- func CGCRequest(method string, url string, body io.Reader) (resp *http.Response, err error)
- func CGCRequestAndRead(method string, url string, body io.Reader) (respBody []byte, err error)
- func CGCRequestAndReadTotalOffset(method string, url string, body io.Reader) (bytesResp []byte, totalOffset int, err error)
Constants ¶
View Source
const ( UrlBase = "https://cgc-api.sbgenomics.com/v2" UrlProjects = UrlBase + "/projects" UrlFiles = UrlBase + "/files" )
Variables ¶
This section is empty.
Functions ¶
func CGCRequest ¶
CGCRequest will make a http request based on method, url & body. It will return http response only if it's 200. If it is not 200, error with body message will be returned
func CGCRequestAndRead ¶
CGCRequestAndRead is wrapper around CGCRequest. Read the response body until EOF.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.