I need to create an endpoint which will provide list of objects, i need to pass as request body list of ID's of objects i want to retrieve. As far i know this should be done by GET method since its only retrieving object and not modifying them, but when i want to call it from client side using
If you want to stick to
GET which is semantically more correct you need to pass the list of IDs as a Request parameter instead of body because
GET doesn't define a body.
POST in which case you can pass the list in the body, is generally fine also though some sticklers will state that it isn't semantically correct.
POST is sometimes preferred depending how complex or long the query data is.