Results 1 to 2 of 2

Thread: cURL REST API Query

  1. #1
    Join Date
    Mar 2011
    Beans
    144
    Distro
    Ubuntu 12.04 Precise Pangolin

    cURL REST API Query

    I have not used cUrl before, but I have noticed that in my Perl script I give a query and it takes the format:

    URL?query={field[value];field['value']}

    But, when I try this with cUrl, it will not query at all:

    curl: (3) [globbing] nested braces not supported at pos 88

    I have tried moving the braces etc etc, it just does not seem to take the same format

    So, the Perl works and it pulls back XML for the queried fields, but why will cUrl not accept this?

    Thanks.

  2. #2
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    2,172
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: cURL REST API Query

    Quote Originally Posted by 3246251196 View Post
    I have not used cUrl before, but I have noticed that in my Perl script I give a query and it takes the format:

    URL?query={field[value];field['value']}

    But, when I try this with cUrl, it will not query at all:

    curl: (3) [globbing] nested braces not supported at pos 88

    I have tried moving the braces etc etc, it just does not seem to take the same format

    So, the Perl works and it pulls back XML for the queried fields, but why will cUrl not accept this?

    Thanks.
    May be the braces should be URL-escaped. Or more likely they are just an indication that the contents of "field[value];field['value']" should be replaced by something adequate for the query, and they shouldn't be part of the final query.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •