0

When the concern of "very long URLs" rears its head (and just won't go away) in REST API design discussions for read-only endpoints, and when there's enough time for careful planning of a new or overhauled API, what are viable options for using POST as if it were GET?

The following answer on Stack Overflow seems to have merit, but what strategies are really working well for real world API implementers?

How to be RESTful with long URLs?

Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
  • Why not using Graphql? – cutiko Nov 22 '17 at 02:02
  • Fine question, indeed. Assume management isn't willing to make GraphQL part of the stack at this time, and that's the end of the discussion. Likewise, assume the end product must take the form of a plain old REST(-ish) HTTP API. – michaelsbradleyjr Nov 22 '17 at 02:04
  • REST API, can be: RESTfull, REST, or RESTless. Depending on how many standards are followed or not. But none is better than the other, no good or evil, there are all the the direction that is more convenient for the project. So a first step could be talk about it openly with the team, once everybody is comfortable by being RESTwhatever cooperation will favour better ideas. – cutiko Nov 22 '17 at 02:39

0 Answers0