// Send is to send a new request
Send is to send a new request
// Send is to send a new request
func (c Config) Send(r Request) (*http.Response, error) {
	url := transferProtocol + baseUrl + apiVersion + c.Path
	auth := "Basic " + base64.StdEncoding.EncodeToString([]byte(r.PublicKey+":"+r.SecretKey))
	client := &http.Client{}
	request, err := http.NewRequest(c.Method, url, bytes.NewBuffer(c.Body))
	if err != nil {
		return nil, err
	}
	request.Header.Set("Authorization", auth)
	request.Header.Set("Content-Type", "application/json")
	response, err := client.Do(request)
	if err != nil {
		return nil, err
	}
	return response, nil
}
func ( c Config ) Send ( r Request ) ( * http . Response , error ) { url := transferProtocol + baseUrl + apiVersion + c . Path auth := " " + base64 . StdEncoding . EncodeToString ( [ ] byte ( r . PublicKey + " " + r . SecretKey ) ) client := & http . Client { } request , err := http . NewRequest ( c . Method , url , bytes . NewBuffer ( c . Body ) ) if err != nil { return nil , err } request . Header . Set ( " " , auth ) request . Header . Set ( " " , " " ) response , err := client . Do ( request ) if err != nil { return nil , err } return response , nil }
Send is to send a new request
Send is to send a new request
// Set url // Create basic authentication // Define client // Request // Define header // Send request & get response // Return data