Passing binary data in JSON format using CURL [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












How could I upload bin data using this FORMAT?
It has to be this format.



curl 'SERVER_REST_API' 
-H 'Accept: application/json, text/plain, */*' -H 'Content-Type: application/json'
-H 'Connection: keep-alive'
--data '"ParentId":"a5pds1I000000Tb3K","Name":"transcript.txt",
"Body":"<I WANT TO UPLOAD BIN FILE HERE CAUSE ITS LARGER THAN 100MB>"'


I want to replace the body part with a large binary file. e.g. A.iso



The current way is not working if I put raw data in the command line.



Is there a way to use the syntax like "Body: @a.iso" ?










share|improve this question















closed as unclear what you're asking by G-Man, Rui F Ribeiro, Goro, dirkt, jimmij Sep 28 at 19:46


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • stackoverflow.com/questions/7172784/… may help.
    – Harald
    Sep 27 at 19:34










  • @Harald not works on my use case. Thanks anyway :)
    – Dummy
    Sep 27 at 19:36






  • 2




    It seems unlikely that the REST API endpoint is looking for raw binary data, since raw binary data could be incompatible with JSON (e.g. a byte that encodes a quote in the binary content would close the Body). Is it looking for base64-encoded content? Can you supply any additional detail about the API endpoint?
    – cherdt
    Sep 27 at 21:24















up vote
0
down vote

favorite












How could I upload bin data using this FORMAT?
It has to be this format.



curl 'SERVER_REST_API' 
-H 'Accept: application/json, text/plain, */*' -H 'Content-Type: application/json'
-H 'Connection: keep-alive'
--data '"ParentId":"a5pds1I000000Tb3K","Name":"transcript.txt",
"Body":"<I WANT TO UPLOAD BIN FILE HERE CAUSE ITS LARGER THAN 100MB>"'


I want to replace the body part with a large binary file. e.g. A.iso



The current way is not working if I put raw data in the command line.



Is there a way to use the syntax like "Body: @a.iso" ?










share|improve this question















closed as unclear what you're asking by G-Man, Rui F Ribeiro, Goro, dirkt, jimmij Sep 28 at 19:46


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • stackoverflow.com/questions/7172784/… may help.
    – Harald
    Sep 27 at 19:34










  • @Harald not works on my use case. Thanks anyway :)
    – Dummy
    Sep 27 at 19:36






  • 2




    It seems unlikely that the REST API endpoint is looking for raw binary data, since raw binary data could be incompatible with JSON (e.g. a byte that encodes a quote in the binary content would close the Body). Is it looking for base64-encoded content? Can you supply any additional detail about the API endpoint?
    – cherdt
    Sep 27 at 21:24













up vote
0
down vote

favorite









up vote
0
down vote

favorite











How could I upload bin data using this FORMAT?
It has to be this format.



curl 'SERVER_REST_API' 
-H 'Accept: application/json, text/plain, */*' -H 'Content-Type: application/json'
-H 'Connection: keep-alive'
--data '"ParentId":"a5pds1I000000Tb3K","Name":"transcript.txt",
"Body":"<I WANT TO UPLOAD BIN FILE HERE CAUSE ITS LARGER THAN 100MB>"'


I want to replace the body part with a large binary file. e.g. A.iso



The current way is not working if I put raw data in the command line.



Is there a way to use the syntax like "Body: @a.iso" ?










share|improve this question















How could I upload bin data using this FORMAT?
It has to be this format.



curl 'SERVER_REST_API' 
-H 'Accept: application/json, text/plain, */*' -H 'Content-Type: application/json'
-H 'Connection: keep-alive'
--data '"ParentId":"a5pds1I000000Tb3K","Name":"transcript.txt",
"Body":"<I WANT TO UPLOAD BIN FILE HERE CAUSE ITS LARGER THAN 100MB>"'


I want to replace the body part with a large binary file. e.g. A.iso



The current way is not working if I put raw data in the command line.



Is there a way to use the syntax like "Body: @a.iso" ?







curl binary json






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 27 at 19:50









Jeff Schaller

33.6k851113




33.6k851113










asked Sep 27 at 19:31









Dummy

42




42




closed as unclear what you're asking by G-Man, Rui F Ribeiro, Goro, dirkt, jimmij Sep 28 at 19:46


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as unclear what you're asking by G-Man, Rui F Ribeiro, Goro, dirkt, jimmij Sep 28 at 19:46


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • stackoverflow.com/questions/7172784/… may help.
    – Harald
    Sep 27 at 19:34










  • @Harald not works on my use case. Thanks anyway :)
    – Dummy
    Sep 27 at 19:36






  • 2




    It seems unlikely that the REST API endpoint is looking for raw binary data, since raw binary data could be incompatible with JSON (e.g. a byte that encodes a quote in the binary content would close the Body). Is it looking for base64-encoded content? Can you supply any additional detail about the API endpoint?
    – cherdt
    Sep 27 at 21:24

















  • stackoverflow.com/questions/7172784/… may help.
    – Harald
    Sep 27 at 19:34










  • @Harald not works on my use case. Thanks anyway :)
    – Dummy
    Sep 27 at 19:36






  • 2




    It seems unlikely that the REST API endpoint is looking for raw binary data, since raw binary data could be incompatible with JSON (e.g. a byte that encodes a quote in the binary content would close the Body). Is it looking for base64-encoded content? Can you supply any additional detail about the API endpoint?
    – cherdt
    Sep 27 at 21:24
















stackoverflow.com/questions/7172784/… may help.
– Harald
Sep 27 at 19:34




stackoverflow.com/questions/7172784/… may help.
– Harald
Sep 27 at 19:34












@Harald not works on my use case. Thanks anyway :)
– Dummy
Sep 27 at 19:36




@Harald not works on my use case. Thanks anyway :)
– Dummy
Sep 27 at 19:36




2




2




It seems unlikely that the REST API endpoint is looking for raw binary data, since raw binary data could be incompatible with JSON (e.g. a byte that encodes a quote in the binary content would close the Body). Is it looking for base64-encoded content? Can you supply any additional detail about the API endpoint?
– cherdt
Sep 27 at 21:24





It seems unlikely that the REST API endpoint is looking for raw binary data, since raw binary data could be incompatible with JSON (e.g. a byte that encodes a quote in the binary content would close the Body). Is it looking for base64-encoded content? Can you supply any additional detail about the API endpoint?
– cherdt
Sep 27 at 21:24
















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?