Hi,
When I try to query the webserver via curl
How would I remove the headers before outputting to the file? I tried referring to curl manpage but couldn't resolve it.
Any help would be appreciated. Thank you!
Hi,
When I try to query the webserver via curl
How would I remove the headers before outputting to the file? I tried referring to curl manpage but couldn't resolve it.
Any help would be appreciated. Thank you!
Hi,
Add /frames/1 at the end of the request, then you just get the pixel data, if that is what you want.
Marcel
Hi Marcel,
Thanks for your response. It's not about the pixel data.
It's just that the response headers gets written to the file thereby making the dicom file invalid to parse.
For example,
The command writes to the file `testPlan.dcm` but at the top of the file, there is a response header (like the one below) making it an invalid dicom file.
```
-Gfu0dPvtO1LMwqbVKkQ5EzneiBRlYDrC
Content-Type: application/dicom
Content-Transfer-Encoding: binary
```
I am not sure how to omit this before the data gets writiten to the file.
Hi,
I think the header is obligatory. If you use a web application to download the data it is removed. Is there an option in curl?
Marcel
Hi Marcel,
Yes. We figured a way to use bytes to take off the preamble from the response.
Thank you.
Don’t have an account yet? Register yourself now and be a part of our community!