I'm working on an application using Amazon's CloudDrive SDK. When requesting a list of folders or files, you can send filters in the query string, but the values of each filter needs to have special characters escaped (included spaces, much like a Linux command line argument). I'm not entirely sure how to send the string through Guzzle (or PHP in general) so that its interpreted by the API as escaped strings.
If I use 'addcslashes' and define all the characters necessary, the API returns with Invalid filter:name:Test\
, but if I simply cURL the same endpoint, it returns the proper data.
When using addcslashes
in PHP, the request value ends up being "name:Test\ Folder AND kind:FOLDER". But as I said, this fails up at the endpoint.
Thanks for any help in advance!