Forum Discussion

dchou's avatar
8 years ago

LIQL queries and white spaces in freemarker

If I'm in the Studio option and go to the API call (LIQL) i can create a query such as:   SELECT * FROM messages WHERE labels.text = "Hello World"   This would return results correctly. But if i ...
  • DougS's avatar
    8 years ago

    Hi dchou,

     

    I made a slight tweak to your freemarker LiQL call and it worked for me on the site I tested on:

     

    <#assign x = rest("2.0","/search?q=" + "SELECT * FROM messages WHERE labels.text = 'Hello World'"?url) />

    The Query should get URL decoded before it's run, so the url-encoded space should be ok.

     

    Let me know if that changed query works for you or not.

     

    -Doug