Flutter http lib url encodes where clause as parameter

Hi, I am using flutter http lib to fetch data from my Backendless application. But when I try to use where clause as query parameter it gets URL encoded and not woking… any idea how to avoid this?

Hello, @milen-dimitrovK5.

Can you provide a reproducible example?

Best Regards, Nikita.

Sure, thanks for the response. My problem is that the http library for consuming Restful clients URL encodes the query parameters, but the Backendless REST API waits for them as plain text.

my code is pretty much trivial:

final response = await http.get(
headers: defaultHeaders,

where query parameters are:
final queryParams = {
‘where’: ‘workingDate>=1643666400000 and workingDate<=1646085599999’;,
‘pageSize’: ‘100’,
‘offset’: offset.toString(),

expected from REST API:
https://…backendless.app/api/data/work_logs?where=workingDate>=1643666400000 and workingDate<=1646085599999’&pageSize=100&offset=0

Created by Dart http lib:

Why don’t you use our flutter-sdk for this?
We do not provide support with problems in third party libraries

I am using http lib in my app to consume other Restful services, and I think it is overkill to use the SDK for 2 calls that app needs :slight_smile: .

Sorry, we can’t provide support for third-party libraries. Contact the support of the authors of the library you are using.


Is there a way to avoid such formating of the where clause?

Backendless expects to receive raw whereClause, without encoding it. I don’t know how to avoid encoding in the lib you’re using. Try to google for preventing encode in this lib.