Topic: REST API, practical questions
We saw REST-services for the project. We try to follow for RESTful-architecture, but sometimes it is impossible. Here, for example, recently the colleague added a method with such signature: [HttpPost] [Route ("ValueSet / $ expand")] public FHIR.Model. Bundle GetValueSetMembersByOIDs (IEnumerable <string> oids) On what I to it noted that the method requesting the data, should use GET-inquiry, instead of POST. The colleague disagrees, I declare supposedly "many times so did also all normally". A question - and whether such focuses in the correct REST-services are admissible? Well i.e. me here such jamb on the one hand is evident, but at the same time I could not find the prohibition of usage POST of requests in descriptions of REST-architecture instead of GET, for request of the data. Further. I called their technical lead and it explained me the reason of such code - in kach-ve parameter to request the array of identifiers is transferred. Each identifier - about 30 characters. If to transfer them as GET-inquiry parameters easily array from 60 identifiers occupies already pair kilobyte and they are not assured, whether exceeds it of limits of length of HTTP-inquiry. Here the second, more important question - as such things become humanly? Here if it is necessary to support GET-inquiries, in which the length of arguments pulls kilobyte on heels how to be? To demand to break requests? Or to spit and request the data through POST-inquiry, transferring parameters in a request body? Or to adjust a Web server, to increase the maximum length of request? Advise. Somebody for certain after all came up against a situation when for request of the data it is necessary to transfer some tens parameters. Can any examples is among well-known REST-services?