// Run makes the HTTP request corresponding to the CreateBottleCommand command. func (cmd *CreateBottleCommand) Run(c *client.Client) (*http.Response, error) { var payload client.CreateBottlePayload if cmd.Payload != "" { err := json.Unmarshal([]byte(cmd.Payload), &payload) if err != nil { return nil, fmt.Errorf("failed to deserialize payload: %s", err) } } return c.CreateBottle(cmd.Path, &payload) }