I am implementing an HTTP REST API which contains a /feed request. The request returns a user's news feed.
The request comes with a few parameters, including the userId, a list of followers, startTime and maxItems.
The easiest way to implement it on the server side (Python and Flask) would be adding a JSON payload, from which I can read the arguments.
Alas, adding a payload to a GET request is not a good idea, and it is no supported by many client libraries.
My options:
- Making
/feedaPOSTrequest. It is ugly, becausePOSTshouldn't be used to request information from a server. - Splitting the
/feedcall to/updateFollowers(POST) and/feed(GET). It would waste time because theGETcall can be made only after thePOSTcall.
Both options seem wrong. Is there any standard way to make a GET-like call with a bunch of complex arguments?