code: func (c *Client) handleSendPostMessage(details *sendPostDetails) {
  	jReq := details.jsonRequest
  	log.Tracef("Sending command [%s] with id %d", jReq.method, jReq.id)
  	httpResponse, err := c.httpClient.Do(details.httpRequest)
  	if err != nil {
  		jReq.responseChan <- &response{err: err}
  		return
  	}
  
  	// Read the raw bytes and close the response.
  	respBytes, err := ioutil.ReadAll(httpResponse.Body)
  	httpResponse.Body.Close()
  	if err != nil {
  		err = fmt.Errorf("error reading json reply: %v", err)
  		jReq.responseChan <- &response{err: err}
  		return
  	}
  
  	// Try to unmarshal the response as a regular JSON-RPC response.
  	var resp rawResponse
  	err = json.Unmarshal(respBytes, &resp)
  	if err != nil {
  		// When the response itself isn't a valid JSON-RPC response
  		// return an error which includes the HTTP status code and raw
  		// response bytes.
  		err = fmt.Errorf("status code: %d, response: %q",
  			httpResponse.StatusCode, string(respBytes))
  		jReq.responseChan <- &response{err: err}
  		return
  	}
  
  	res, err := resp.result()
  	jReq.responseChan <- &response{result: res, err: err}
  }
docs: // handleSendPostMessage handles performing the passed HTTP request, reading the
  // result, unmarshalling it, and delivering the unmarshalled result to the
  // provided response channel.