// isOK is called inside the `Client#Do` and it closes the body reader if no accessible.
isOK is called inside the `Client#Do` and it closes the body reader if no accessible.
// isOK is called inside the ` Client#Do ` and it closes the body reader if no accessible .
func isOK(resp *http.Response) bool {
	return resp.StatusCode == http.StatusOK ||
		resp.StatusCode == http.StatusCreated || 
		resp.StatusCode == http.StatusAccepted || 
		resp.StatusCode == http.StatusNoContent || 
		(resp.Request.Method == http.MethodDelete && resp.StatusCode == http.StatusNoContent) || 
		(resp.Request.Method == http.MethodPost && resp.StatusCode == http.StatusNoContent) || 
		(resp.StatusCode == http.StatusBadRequest && resp.Request.Method == http.MethodGet)  
}
func isOK ( resp * http . Response ) bool { return resp . StatusCode == http . StatusOK || resp . StatusCode == http . StatusCreated || resp . StatusCode == http . StatusAccepted || resp . StatusCode == http . StatusNoContent || ( resp . Request . Method == http . MethodDelete && resp . StatusCode == http . StatusNoContent ) || ( resp . Request . Method == http . MethodPost && resp . StatusCode == http . StatusNoContent ) || ( resp . StatusCode == http . StatusBadRequest && resp . Request . Method == http . MethodGet ) }
isOK is called inside the `Client#Do` and it closes the body reader if no accessible.
isOK is called inside the ` Client#Do ` and it closes the body reader if no accessible .
/* see CreateOrUpdateConnector for the `StatusCreated` */ /* see PauseConnector for the `StatusAccepted` */ /* see TopicSettings for the `StatusNoContent` */ /* see RemoveConnector for the `StatusNoContnet` */ /* see Restart tasks for the `StatusNoContnet` */ /*||*/ /* for things like LSQL which can return 400 if invalid query, we need to read the json and print the error message */ // (resp.Request.Method == http.MethodDelete && ((resp.StatusCode == http.StatusForbidden) || (resp.StatusCode == http.StatusBadRequest))) /* invalid value of something passed */