Closed higgsch closed 8 years ago
PUT and DELETE have industry known issues. Confirmed by Prof. Rob Hilton that using duplicate GET and POST function as DELETE and PUT is industry accepted workaround. Now we need to decide how we are going to model them.
Okay, so I have routed the Http table as follows using an example of a Hello table:
To GET: GET -> api/Hello [This means to send a GET request to the url pjc.gear.host/api/Hello] To GET by id (ex. 5): GET -> api/Hello/5 To POST: POST -> api/Hello To PUT: POST -> api/Hello?put=true To DELETE by id (ex. 5): GET -> api/Hello/5?delete=true
Next I'll be looking at how this will work with token authentication
Following breaks down how to link into the Web API:
To GET: GET -> api/
When a token is required:
To GET: GET -> api/
PUT and DELETE aren't working. 405 error means that the command isn't supported. Research points towards the inclusion of WebDAV and/or PUT/DELETE not being included in the verb list. But neither nor both of these modifications resolve the issue.
Temporarily using: < Table > GET as GET < Table > GET(id) as GET(id) < Table > POST(< record >) as POST(< record >) Delete< Table > GET(id) as DELETE(id) Delete< Table > POST(< record >) as PUT(< record >)