I have one API GET function in vb .net 4.7
The routing works fine for GET: /api/data?symb=AAPL&tok=XXXXX
But I wish to do another API call to a separate GET call with different data source like /api/fred?symb=XGGGD&key=XXXXX
How can I set up multiple APIs calls to two different get functions from two separate URL requests?
' Web API routes
config.MapHttpAttributeRoutes()
config.Routes.MapHttpRoute(
name:="DefaultApi",
routeTemplate:="api/{controller}/{id}",
defaults:=New With {.id = RouteParameter.Optional}
)
<CustomExceptionFilter>
Public Class DataController
Inherits ApiController
'GET: /api/data?symb=AAPL&tok=XXXXX
Public Function [Get](Optional Sym As String = "X123456789",
Optional Tok As String = "X123456789",
Optional DateF As String = "4",
Optional DateS As String = "19010101",
Optional DateE As String = "20751231",
Optional FileH As String = "True",
Optional FileS As String = "True",
Optional FileN As String = "1",
Optional DWM As String = "D",
Optional LastX As String = "0",
Optional SepD As String = "1"
) As HttpResponseMessage