7 Replies Latest reply on Jun 12, 2017 9:15 PM by user280

    JSON Timestamp encoding cURL space character problem

    user280

      Trying to encode a Timestamp in URL options....

       

      From the command line the search with a space between the date and the time work perfectly.

       

      From a FM calculation it stops calculating when it hits a space...

       

      Here is the FM calculation....

       

      "--header \"Content-type: application/json\" --header \"securityToken:" & $$access_token  &  "\" -d {\"searchCriteria\":{\"offset\":0,\"limit\":100,\"searchString\":\"\",\"startDate\":\"06/01/2017 04:00:00\",\"endDate\":\"06/11/2017 04:00:00\"}}"

       

       

      User-Agent: FileMaker/16.0

      Accept: */*

      Accept-Encoding: deflate, gzip

      Content-type: application/json

      securityToken:111670465/DTMmxhMMzNeF0ZbtNd658Ubr

      Content-Length: 83

       

      {"searchCriteria":{"offset":0,"limit":100,"searchString":"","startDate":"06/01/2017

       

      If I remove the times it works perfectly...

       

      "--header \"Content-type: application/json\" --header \"securityToken:" & $$access_token  &  "\" -d {\"searchCriteria\":{\"offset\":0,\"limit\":100,\"searchString\":\"\",\"startDate\":\"06/01/2017\",\"endDate\":\"06/11/2017\"}}"

       

      User-Agent: FileMaker/16.0

      Accept: */*

      Accept-Encoding: deflate, gzip

      Content-type: application/json

      securityToken:111670465/DTMmxhMMzNeF0ZbtNd658Ubr

      Content-Length: 109

       

      {"searchCriteria":{"offset":0,"limit":100,"searchString":"","startDate":"06/01/2017","endDate":"06/11/2017"}}

       

      How do I get the space character into the query?  I tried two ways of URL encoding %20 and the slash one....

       

      No luck...

       

      Thanks

       

      Chris