You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use any http that has "{" and "}" https://my.restdb.io/rest/users?q={"orderInfo":{"$elemMatch":{"userID":3366129827943}}}
Copy the code for cURL curl -X GET 'https://my.restdb.io/rest/users?q={%22orderInfo%22:{%22$elemMatch%22:{%22userID%22:3366129827943}}}' -H 'apikey: 5bd08e5ac19ba11113b50dad' -H 'x-apikey: 5bd08e5ac19ba11113b50dad'
Run on Bash
Get the error curl: (3) [globbing] nested brace in column 52
To fix
Detect nested braces in the URL and add the option "-g" to cURL or escape braces as "{"
Decription
cURL will fail if in the URL there are nested brackets "{" or "}" as it was not escape neither the -g option set
eg. https://my.restdb.io/rest/users?q={"orderInfo":{"$elemMatch":{"userID":3366129827943}}}
To Reproduce
https://my.restdb.io/rest/users?q={"orderInfo":{"$elemMatch":{"userID":3366129827943}}}
curl -X GET 'https://my.restdb.io/rest/users?q={%22orderInfo%22:{%22$elemMatch%22:{%22userID%22:3366129827943}}}' -H 'apikey: 5bd08e5ac19ba11113b50dad' -H 'x-apikey: 5bd08e5ac19ba11113b50dad'
curl: (3) [globbing] nested brace in column 52
To fix
Detect nested braces in the URL and add the option "-g" to cURL or escape braces as "{"
curl -g -X GET 'https://my.restdb.io/rest/users?q={%22orderInfo%22:{%22$elemMatch%22:{%22userID%22:3366129827943}}}' -H 'apikey: 5bd08e5ac19ba11113b50dad' -H 'x-apikey: 5bd08e5ac19ba11113b50dad'
or
curl -X GET 'https://my.restdb.io/rest/users?q={%22orderInfo%22:\{%22$elemMatch%22:\{%22userID%22:3366129827943\}\}}' -H 'apikey: 5bd08e5ac19ba11113b50dad' -H 'x-apikey: 5bd08e5ac19ba11113b50dad'
The text was updated successfully, but these errors were encountered: