Advertisement
Guest User

You don't know my name

a guest
Jan 18th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Net.Http;
  6. using System.Web.Http;
  7.  
  8. namespace WebAppBinding.Controllers {
  9.     public class ValuesController : ApiController {
  10.         // GET api/<controller>
  11.         public IEnumerable<string> Get() {
  12.             return new string[] { "value1", "value2" };
  13.         }
  14.  
  15.         // GET api/<controller>/5
  16.         public string Get(int id) {
  17.             return "value";
  18.         }
  19.  
  20.         // POST api/<controller>
  21.         public string Post([FromBody]string value) {
  22.             return $"fuck you that's why: {value}";
  23.         }
  24.  
  25.         // PUT api/<controller>/5
  26.         public void Put(int id, [FromBody]string value) {
  27.         }
  28.  
  29.         // DELETE api/<controller>/5
  30.         public void Delete(int id) {
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement