I want to send my controller a website url and my server will fetch some details related to that site and send me back. Something similar to what this site does.
How do I go about modelling this problem in restful way?
I can create a
WebsiteDetails controller and then should I do
but it doesn't feel right as this should refer to an action that returns
list of items. Any suggestion on this?
Write your answer…
@ankitsinghaniyaz, when I try to visit the link I get an error saying 'Security token doesn't match, possible CSRF attack.' So, I am not quite sure what your example does. To me, the problem statement sounds like a web crawler. If that's the case, why do you say that GET/website_details?url=xyz.com is not RESTful?
Going by specs, this is how a REST GET is defined:
The GET method requests transfer of a current selected representation for the target resource. GET is the primary mechanism of information retrieval
The Dev Community
Free, friendly and inclusive platform for developers
Or connect with