Ejemplo n.º 1
0
        public HttpResponseMessage Post(SearchModel searchModel)
        {
            if (searchModel.Username == "unknown-username")
            {
                throw new HttpResponseException((HttpStatusCode)422);
            }

            return Request.CreateResponse(HttpStatusCode.Created, searchModel.Username);
        }
Ejemplo n.º 2
0
 public string Post(SearchModel searchModel)
 {
     return searchModel.Username;
 }