Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

file: fix CORS on File.prototype.content #124

Merged
merged 2 commits into from
Jun 20, 2019

Conversation

balupton
Copy link
Contributor

@balupton balupton commented Jun 20, 2019

@@ -15,7 +15,7 @@ export default class File extends API {
* @returns Raw data
*/
async content(hash: string) {
const response = await this.sendGet(`file/${hash}/data`)
const response = await this.sendGet(`file/${hash}/content`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and easy. @balupton, this is going to come up with other redirects, which I like having available, as it means we can be a little more flexible with releasing updates to js-http-client. Any idea what the best way is to more permanently fix these CORS stoppers on the Go side of things?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, as any redirect is a mark of deprecation, so we should coordinate immediate parch releases of this api client whenever we do such things with go-tectile. Patch releases will be adopted automatically by consumers of this client. This client is also the only one affected by cors.

@carsonfarmer
Copy link
Member

I'm going to just get this one merged @balupton. I think if I don't squash, you'll get the credit...

@carsonfarmer carsonfarmer merged commit 218a281 into master Jun 20, 2019
@carsonfarmer carsonfarmer deleted the benjamin/fix-cors-content branch June 20, 2019 19:47
@balupton
Copy link
Contributor Author

I'm going to just get this one merged @balupton. I think if I don't squash, you'll get the credit...

Squashing co-authors the commit, which is fine and dandy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

file.content invoke incorrect URL
2 participants