code: func (kinesis *Kinesis) query(params map[string]string, data interface{}, resp interface{}) error {
  	jsonData, err := json.Marshal(data)
  	if err != nil {
  		return err
  	}
  
  	// request
  	request, err := http.NewRequest(
  		"POST",
  		kinesis.getEndpoint(),
  		bytes.NewReader(jsonData),
  	)
  
  	if err != nil {
  		return err
  	}
  
  	// headers
  	request.Header.Set("Content-Type", "application/x-amz-json-1.1")
  	request.Header.Set("X-Amz-Target", fmt.Sprintf("%s_%s.%s", kinesis.getStreamType(), kinesis.getVersion(), params[ActionKey]))
  	request.Header.Set("User-Agent", "Golang Kinesis")
  
  	// response
  	response, err := kinesis.client.Do(request)
  	if err != nil {
  		return err
  	}
  	defer response.Body.Close()
  
  	if response.StatusCode != 200 {
  		return buildError(response)
  	}
  
  	if resp == nil {
  		return nil
  	}
  
  	return json.NewDecoder(response.Body).Decode(resp)
  }
docs: // Query by AWS API