![]() |
Hi,
I working with a 3rd Party API and need to configure the URL as per the 3rd party spec. PHP Code: $my_row = $client->get('/THIRDPARTY/?filter__Company%20Name__equal=my%20company%20(sports%20department) However, CURL Request Class encodes the url to: Code: GET /THIRDPARTY/?filter__Company_Name__equal=my+company+%28sports+department%29 I can't see anything obvious in the documentation and the only setting I can find in Config->CURLRequest is PHP Code: public $shareOptions = true; (08-17-2024, 09:58 AM)68thorby68 Wrote: Is there a way to instruct the CURL Request Class not to encode the url? No. Use `query` option to send a request with query string. https://codeigniter.com/user_guide/libra...html#query
(08-17-2024, 06:58 PM)kenjis Wrote:(08-17-2024, 09:58 AM)68thorby68 Wrote: Is there a way to instruct the CURL Request Class not to encode the url? Many thanks kenjis, with logging, my request is now and works perfectly, Thank you My code new reads: PHP Code: $update_row = $client->request('GET','/THIRDPARTY/', Code: GET /THIRDPARTY/?user_field_names=true&filter__Company+Name__equal=my+company+%28sports+department%29 Just to note, when I use the format PHP Code: $update_row = $client->get('/THIRDPARTY/?user_field_names=true&filter__Company Name__equal=my company (sports department), Code: GET /THIRDPARTY/?user_field_names=true&filter__Company_Name__equal=my+company+%28sports+department%29 Again many thanks. |
Welcome Guest, Not a member yet? Register Sign In |