curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Issue in fragmentation of JSON Data

From: Dan Fandrich via curl-users <curl-users_at_lists.haxx.se>
Date: Fri, 20 Jan 2023 13:33:15 -0800

On Sat, Jan 21, 2023 at 01:01:39AM +0400, Hamid Kaashif via curl-users wrote:
> I tried fragmenting scan_id, however, got an error message (fragmented request
> below)
>
> curl 'https://api-prod.grep.events/1/container/5342/thing/user_id/mutual/scan'
> -H 'Authorization: Bearer geKkBJw8a1zhag38euv4GS75tIOWcT4' -H 'X-Authorization:
> 5d85018f-7d08-45d9-897c-a0506dcda28c' -H 'Content-Type: application/json'
> --data '{"scan_id":["29121227092[920-999]"]}'

Are you trying to use curl's globbing support in this data? That's not going to
work since globbing is only supported in URLs and upload file names. If instead
of POSTing the data the server lets you GET it, then you can do something like
this:

  curl 'https://server/scan?scan_id=29121227092[920-999]'

Dan
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-01-20