Skip to content
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

Create an Attachment constructor that takes a URI and a constructor that takes a string #272

Open
rianjs opened this issue Apr 28, 2017 · 0 comments

Comments

@rianjs
Copy link
Collaborator

rianjs commented Apr 28, 2017

v2's Attachment constructor takes a string, which it uses as a Uri. Consider creating an nth Attachment constructor that takes a Uri, and uses it as a URI as the spec intends.

In addition, it might be helpful to retain the string constructor, and auto-convert that a base64-encoded payload.

Caveats: this could create subtle bugs in existing applications. Maybe in the string constructor, we could add a Uri.TryParse call that calls the Uri-based constructor if the string looks like a URL as a workaround.

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

No branches or pull requests

2 participants