func (c *Client) post(url string, todo *Todo) error {
	bodyType := "application/json"
	body, err := todo.Encode()
	if err != nil {
		return err
	}
	resp, err := http.Post(url, bodyType, body)
	if err != nil {
		return err
	}
	if verbose {
		log.Printf("client: %s\n", resp.Status)
	}
	return nil
}
// post sends a post request with a json payload.
post sends a post request with a json payload.
// post sends a post request with a json payload .
func (c *Client) post(url string, todo *Todo) error {
	bodyType := "application/json"
	body, err := todo.Encode()
	if err != nil {
		return err
	}
	resp, err := http.Post(url, bodyType, body)
	if err != nil {
		return err
	}
	if verbose {
		log.Printf("client: %s\n", resp.Status)
	}
	return nil
}
func ( c * Client ) post ( url string , todo * Todo ) error { bodyType := " " body , err := todo . Encode ( ) if err != nil { return err } resp , err := http . Post ( url , bodyType , body ) if err != nil { return err } if verbose { log . Printf ( " \n " , resp . Status ) } return nil }
post sends a post request with a json payload.
post sends a post request with a json payload .