12345678910111213141516171819202122232425262728293031 |
- Imports System.Net
- Imports System.Web.Http
-
- Public Class ValuesController
- Inherits ApiController
-
- ' GET api/<controller>
- Public Function GetValues() As IEnumerable(Of String)
- Return New String() {"value1", "value2"}
- End Function
-
- ' GET api/<controller>/5
- Public Function GetValue(ByVal id As Integer) As String
- Return "value"
- End Function
-
- ' POST api/<controller>
- Public Sub PostValue(<FromBody()> ByVal value As String)
-
- End Sub
-
- ' PUT api/<controller>/5
- Public Sub PutValue(ByVal id As Integer, <FromBody()> ByVal value As String)
-
- End Sub
-
- ' DELETE api/<controller>/5
- Public Sub DeleteValue(ByVal id As Integer)
-
- End Sub
- End Class
|