Content-Range Header Won't Apply In REST Connector Operation

Hello,
I am trying to define the Content-Range header in an operation I have under my REST connector. When I set the value and check required, the header does not appear under headers and when I send my request I get the following error: {“error”:{“code”:“invalidRequest”,“message”:“The Content-Range header is missing or malformed.”}}
I have tried creating/updating the connector first then attempting the request but that did not work either. This header is required by the request I am making, and I am wondering if I am doing something wrong to include this header although I filled in the value, checked required and tried checking override as well.

Best,
Andrew

Hi, Sorry I am not sure I fully follow. Can you send some screenshots?



When attempting through the flow it returns a 405 error. When I test directly in the connector I get the error I stated previously where it says the header is missing or malformed. I am certain it is missing since this exact header I am inputting works in postman, and the header does not show in the operation designer after being updated.

Best,
Andrew

Can you log the request to a file? (under the connector, but you need to provide a path on the server which you can access to read the output files).

I did a quick test and it seem to work:

I have made some notable changes since last post. I cannot seem to figure out how to have content-range as a parameter so I can calculate the value from within my flow. For now, I have it as a hardcoded value. I am currently running into a 401 error. The authorization token being used is from earlier in the flow that is used to generate the upload URL. It also works to do this PUT request within postman. ExcelFile references the variable from when the user uploads an excel file through file gallery. From my understanding ExcelFile.data is then the correct stream to have in the body of the request.





Capture

I remember having done a solution like that to upload a file but I cannot seem to find it right now, unfortunately.

But as far as I remember I used this:

together with this setting (stream), with a put, not patch but this is just to get the screenshot:

image

If I get some time over in the coming week I will try to recreate it, but no promises.

1 Like

Thank you! I got everything working now.

Best,
Andrew