// POST api/AuthTest?token=<token> //public HttpResponseMessage Post(Token<AuthTest> packet) public HttpResponseMessage Post(string token, AuthTest test) { //string token = packet.token; //AuthTest test = packet.obj; APIAuth.authorizeToken(token); test.UserName = APIAuth.getUserNameFromToken(token); db.AuthTests.Add(test); db.SaveChanges(); var response = Request.CreateResponse<AuthTest>(HttpStatusCode.Created,test); //var response = Request.CreateResponse(HttpStatusCode.Created); return response; }
public HttpResponseMessage Put(bool put, string token, int id, AuthTest test) { return new HttpResponseMessage(); }