Passing binary data in JSON format using CURL [closed]
Clash 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" ?
curl binary json
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.
add a comment |Â
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" ?
curl binary json
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
add a comment |Â
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" ?
curl binary json
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
curl binary json
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
add a comment |Â
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
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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