-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement REST Communication #26
Comments
Here are my thoughts based on what we had before. Phased approaches are totally fine! Features
|
@ChristianPotvin Added some notes. |
Aside from what @jkeon mentioned I just want to make sure as much can be composed as possible so that any given call or project can select
@jkeon Is this something that needs to be explicitly implemented? Seems like adding into a
Is this in addition to being able to manipulate headers? I thought Auth was all done in the header info. |
Agreed with Mike's comments minus a couple clarifications below:
Agreed it would, however that's a lot more work on the developer. Now at first you scoff and say, "no not really, just create your sequential command, fill it up with your calls and fire it off". But then you get into actually implementing in your app and you realize that the Sequential Command needs to be global since many different parts of the app could fire a REST call at anytime and they need to go in order. That Sequential Command also needs to live forever so it's probably better to be a BufferCommand too. And then after all that, why don't we just have that built into the system for you anyway? Saves you work managing it, reduces race condition bugs where you forget to do it and your calls arrive on the server out of order.
You're 100% correct that you can support all Authorization via headers directly but C# has some nice helpers to properly format the header according to the standard: So maybe it's not something we need as part of the core, but a nice helper for setting common Headers with the common inputs would be nice. Ex. Bearer Authentication means: POST - Key: "Authorization", Value: "Bearer Sure you can definitely look it up and manually add it to your calls with a Same thing with a bunch of headers, we can probably make it really nice with enums. Agreed it's not critical and a nice to have though. |
In thinking about this more and talking with Mike, it's probably fine to implement without a global queue for V1. We probably should have a good case to warrant adding it. Simple first is probably better. |
Sounds good. I'll tap you with questions as I dig further into this and start forming a better understanding of what I'm getting into. In all likelihood, it will start simple and be built upon as I go until it resembles something everyone can be happy with. This is largely unexplored territory for me, but it's something I want to learn more about, and there's no better way to learn than to throw yourself into it and see where it takes you. |
In pure CSharp land, we'll want to use HTTPClient.
But in Unity land, we'll want to use UnityWebRequests.
Is there a nice way to wrap them both into the same Anvil API?
The text was updated successfully, but these errors were encountered: