I created a page called api.aspx
I am displaying my output using a JSON serialize.
Each type of function is based on query string. For example:
If Request.QueryString("action") = "getMember"
Then from there, I do a
Request.QueryString("memberid")
For the variable I required for my function to work. Lastly the output is displayed as JSON.
In REST, there should be no verbs in the
URI, especially no things such as?action=getMember. The core REST principle is HATEOAS – which says that the state of the application is represented by the state of its resources.Furthermore, the application should use a uniform interface – that is, use the standard HTTP methods
POST,GET,PUTandDELETEfor CRUD operations respectively.So, such a
memberresource from your example should be accessed viaGETrequest to a URI such as:Where {memberId} is path parameter that represents the memberId.