I've many parameters(filters) for getting data from API so i've used POST method for sending parameters(filters) to API . Its working fine but I want to know its ok to use POST function for getting list from API ?
Reason for using POST instead GET :
If I've used GET function it will create problem for array data and also We need to pass some string data that may contain some special characters so in GET method need lot off manual error handling.
Our application under development phase so when new parameter need to add every time we need to change the URL on all our applications where we use this API.
$filter = (object) array(
'page_name' => '',
'page_category' => 0,
'page_gender' => 'N',
'page_country' => 0,
'page_company' => 0,
'page_language' => 0,
'page_order' => 'ASC',
'page_order_field' => 'dlang_firstname',
'page_currency' => 47,
'page_currency_unit' => 1,
'page_currency_iso' => 'GBP',
'page_current' => $page,
'page_size' => env('PAGE_SIZE', 10),
);
Above data I've passing to API.Is there any other way to send data ?