Problème with REST API call and space characters



Currently I have a problem with Dream Factory REST API call when a space is present into the API URL call.
I have a get request with a sort parameter that must to be send for SOLR server. This space I don’t know how it is converted, but it seems to arrive into not appropriate mananer.

curl -X GET
-H ‘X-DreamFactory-Api-Key: e115f92d18ba58e9a29389’
-H ‘X-DreamFactory-Session-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1’

Is it a Dream factory problem and is there a manner to surround this problem ?



Maybe I should use + character instead of %20?


Finaly the solution that I found is to change the curl call in order to make POST request and to put the parameters with spaces into the -d parameter.

Here is the call that work for our case :

curl -X POST
-H ‘X-DreamFactory-Api-Key: e115f92d18ba58e9a2’
-H ‘X-DreamFactory-Session-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJz’
-d ‘sort=random_test+DESC&fq=NAME:ov+OR+NAME:a