code: func (r *ChainResource) Post(context smolder.APIContext, data interface{}, request *restful.Request, response *restful.Response) {
  	resp := ChainResponse{}
  	resp.Init(context)
  
  	pps := data.(*ChainPostStruct)
  	dupe := bees.GetChain(pps.Chain.Name)
  	if dupe != nil {
  		smolder.ErrorResponseHandler(request, response, nil, smolder.NewErrorResponse(
  			422, // Go 1.7+: http.StatusUnprocessableEntity,
  			errors.New("A Chain with that name exists already"),
  			"ChainResource POST"))
  		return
  	}
  
  	chain := bees.Chain{
  		Name:        pps.Chain.Name,
  		Description: pps.Chain.Description,
  		Event:       &pps.Chain.Event,
  		Actions:     pps.Chain.Actions,
  		Filters:     pps.Chain.Filters,
  	}
  	chains := append(bees.GetChains(), chain)
  	bees.SetChains(chains)
  
  	resp.AddChain(chain)
  	resp.Send(response)
  }
docs: // Post processes an incoming POST (create) request