Removing headers from the webserver response

  • Hi,

    When I try to query the webserver via curl


    Code
    curl http://127.0.0.1/api/dicom/rs/studies/{}/series/{}/instances/{} --output F:\Downloads\test\testPlan.dcm


    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 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,


    Code
    curl http://127.0.0.1/api/dicom/rs/studies/{}/series/{}/instances/{} --output F:\Downloads\test\testPlan.dcm

    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.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!