Hi @aeric , I was going through your WebApi templates and I noticed that you implemented the /api/v1/products/{productId} pattern. Can you please work me through it please??
I am building an api without using the WebApi templates(I have gone a bit far in the project).
Thanks
Sub Class_Globals
Private Request As ServletRequest
End Sub
Request.RequestURI ' Returns the request URL without the host and any parameters
Request.FullRequestURI ' Returns the full request URL including the scheme, host and parameters
May be it is just a bad definition but the parameters in an URL comes after the question mark ? and they are pair of key and values. the best way to get them is:
B4X:
dim parameters as map = req.ParameterMap
if what you want is the embbeded id inside the URL then aeric answer is correct.
May be it is just a bad definition but the parameters in an URL comes after the question mark ? and they are pair of key and values. the best way to get them is:
B4X:
dim parameters as map = req.ParameterMap
if what you want is the embbeded id inside the URL then aeric answer is correct.