I have done some reading regarding GET and POST methods and know that GET method should be used when fetching data where the parameters are in URL. Whereas POST in general should be used to store data with data in the body.
But, I have an API that takes JSON as input. So I think I need to use POST method but what bothers me is that I won't make any changes to backend. I just need to fetch data according to the parameters in the JSON.
Would it be a bad practice to use POST method just to accept JSON even though no changes will be made? If so, what other approaches can I take? Thank you
Yes, you can add JSON data in the body. I'm not sure what language you are using, but for example in the requests module in Python, you can add some data to the Get request as shown in here.