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
/feed
aPOST
request. It is ugly, becausePOST
shouldn't be used to request information from a server. - Splitting the
/feed
call to/updateFollowers
(POST
) and/feed
(GET
). It would waste time because theGET
call can be made only after thePOST
call.
Both options seem wrong. Is there any standard way to make a GET
-like call with a bunch of complex arguments?