a8m / rql

Resource Query Language for REST
MIT License
343 stars 42 forks source link

Build Query String #9

Closed rockmantist closed 5 years ago

rockmantist commented 5 years ago

on your example: curl --request POST --data '{"filter": {"name": {"$like": "t%st"}}}' http://localhost:8080/users

how if we want to use GET request using query string ? how is the query string looks like ?

a8m commented 5 years ago

If you are using the example from this repo (which assumes the query-string is base64), you can do it this way:

curl http://localhost:8080/users\?query\=$(echo '{"filter": {"name": {"$like": "t%st"}}}' | base64)

I'm closing the issue, but feel free to open it if you have further questions/issues.