func makeRequest(host string, values url.Values, userId string, userSecret string, region string) (*http.Response, error) { url_, err := url.Parse(host) if err != nil { return nil, err } req, err := http.NewRequest("POST", url_.String(), strings.NewReader(values.Encode())) req.Header.Set("Content-Type", "application/x-www-form-urlencoded; param=value") aws.SignRequest(req, userId, userSecret, "sns", region) response, err := http.DefaultClient.Do(req) return response, err }
func makeRequest(host string, query string, action string, userId string, userSecret string, region string) (*http.Response, error) { url_, err := url.Parse(host) if err != nil { return nil, err } req, err := http.NewRequest("POST", url_.String(), strings.NewReader(query)) req.Header.Set("x-amz-target", "DynamoDB_20120810."+action) req.Header.Set("Content-Type", "application/x-amz-json-1.0") aws.SignRequest(req, userId, userSecret, "dynamodb", region) response, err := http.DefaultClient.Do(req) return response, err }