-
Notifications
You must be signed in to change notification settings - Fork 173
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
🐛 Bug Report: HTTP call to Client
throws error due to he HttpMethod
enum not being exported from client.dart
#699
Comments
Hey @hanskokx , may I know the reason why you are using |
@joeyouss It's been a couple of weeks since I filed this (and I've since moved on from the project and taken a vacation). I can no longer recall why I was trying to call the client directly. :) |
hI @hanskokx , apologies for the delayed response so the reason why I asked this is basically - client.call is an internal method used by us and not meant for public usage since it won't be working as expected by you. I understand, this might have been a bit confusing and for everything that is usable - our docs are a reference for that https://appwrite.io/docs. Thank you so much for opening the issue and your reply! |
Not a problem! I think the reason was that I wanted to move a file from one bucket to another (e.g., private bucket to public bucket) without downloading/re-uploading the button. I thought maybe I could do it by calling the client directly. If I had a guess, that would be why I filed the bug. |
I totally get it but that won't actually help you do that. A potential solution could be using document-level permissions and changing the permissions on the file itself to public instead of moving it to a bucket with public permissions. |
Fair enough. I was working within my client's constraints, though. This is how they set it up. 🤷🏻♂️ |
Oh, I understand |
Client
throws error due to he HttpMethod
enum not being exported from client.dart
@hanskokx I just noticed this. This is a fascinating approach, I mean, we don't expose the Client because it's really supposed to be an internal class. If you need to switch between buckets, you'll likely need to do something strange with the buffers. You CAN do this by just not using the SDK at all and use HTTP directly. You'll probably struggle with the chunk-upload implementation a little for large files. They're just a nightmare for everyone 🥼 I lost many hairs when working without the SDK, but you can peep the generated SDK code and just copy it. Checkout this page: https://appwrite.io/docs/rest I really don't think we're going to support this any time soon though, but maybe this can be a community contribution, as a utility extension to the Appwrite SDKs? Hope this is reasonable to hear ❤️ |
👟 Reproduction steps
When I attempt to make an HTTP call to the
Client
, I am unable to due to theHttpMethod
enum not being exported fromclient.dart
:👍 Expected behavior
I should be able to make a call to the
Client
using the providedenum
.👎 Actual Behavior
The
HttpMethod
enum is not exported fromclient.dart
, therefore I am unable to use thecall
method on theClient
.🎲 Appwrite version
Different version (specify in environment)
💻 Operating system
Something else
🧱 Your Environment
This is a client issue, not a server issue.
My
pubspec.yaml
specifiesappwrite: ^9.0.1
.👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: