Home > Net >  Model Derivative API - Download OBJ File Request Headers
Model Derivative API - Download OBJ File Request Headers

Time:10-15

I'm going through the step-by-step tutorials of how to translate a source file on the model derivative API. I'm on the final step of just downloading the OBJ file using the signed download URL and the three cookies. I have the download URL and the cookies, I just don't know how to format the headers for the request. Like would the header look like this:

headers = {
'<FIRST_SIGNED_COOKIE>': '',
...
}

Based off that documentation, it makes it look like to me that I'm just sending a string through the header. The requests library in python doesn't seem too happy with that though.

enter image description here

Also, link to what I'm following: https://forge.autodesk.com/en/docs/model-derivative/v2/tutorials/translate-to-obj/task4-download-obj-file/

CodePudding user response:

Generally, if you want to include certain cookies with your request, you would use the Cookie header, e.g., like so:

curl -X GET '...' -H 'Cookie: name=value; name2=value2; name3=value3'

Alternatively, based on this Stack Overflow answer, you could also say:

curl -X GET '...' --cookie "name=value" --cookie "name2=value2" --cookie "name3=value3"
  • Related