-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
400 when getting file content #485
Comments
Confirmed that Go's default HTTP client also works successfully. |
We also are currently using the Go's default HTTP client for this specific call |
@baywet @rkodev Any chance you can take a look at this? We're using an ugly hack (wait for the 400 and then use the URL to make another request with default client) to work around this. We're still in the prototype phase, so we can deal for the very short-term, but obviously won't work for production. Thanks. |
@andrueastman Can you take a look at this or get the attention of someone who will? |
We saw this too. It happens because the download link in the 302 has a different host, and kiota-http's redirect handler copies the request verbatim, modifying only the URL - it keeps the original There's no way to comfortably monkey patch it either, so we had to create an The fix should probably go here: The URL's host is checked in order to drop the |
Hi @eric-millin this issue is currently in progress. , Please close [this ] related issue (microsoft/kiota-http-go#97 and keep the conversation here. |
I'm trying to get the contents of a drive item. When I use the SDK client to make the call, I get a 400. However, when I curl the same URL, it works. That makes me believe it might be an SDK issue rather than and API issue.
I am using v0.60.0 (I cannot upgrade because of #481).
Details
Here's roughly what happens:
https://graph.microsoft.com/v1.0/drives/<drive-id>/items/<item-id>/content
.302
tohttps://mytech.sharepoint.com/_layouts/15/download.aspx?UniqueId=ugly-gu-id&Translate=false&tempauth=some.jwt.token&ApiVersion=2.0
400
with the messageHowever, If I curl the redirect URL, e.g.
the API returns a valid file.
The text was updated successfully, but these errors were encountered: