I have a web API method, which takes json request object
{
"FundCodes":["0DFOY"],
"FromDate":"2021-04-01",
"ToDate":"2021-05-01"
}
As this api retrieves data, I think the web API needs to be a GET.
However, if I do that, how do I pass above in a query string?
I know that HTTP GET does have a body and I can put the parameter in, but I think lots of people are against the idea of using a body. So how do I put this into query string?
I used this site to urlencode the parameter, but seems my API call doesn't recognise the passed parameter. https://onlinejsontools.com/url-encode-json
So is there a bit more official way on web API design for this? Maybe I should use POST other than GET?