-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Replace EmbedIO with GenHTTP #862
base: development
Are you sure you want to change the base?
Conversation
[Route(HttpVerbs.Any, "/status")] | ||
public void GetStatus() | ||
[ResourceMethod(RequestMethod.Post, "bring-to-foreground")] | ||
public void BringToForeground(IRequest request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your logic could be simplified with a [FromBody] string? route
argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I did try this, but it seems routes may not be omitted even if declared nullable?
{
"status": 400,
"message": "Argument 'route' is expected to be read from the request body but the request does not contain any payload"
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I would consider this a bug. Sorry, will fix this in the next version.
This PR replaces the EmbedIO library with GenHTTP.
While we didn't have any specific issues with EmbedIO it is no long being developed and pretty much abandoned.
GenHTTP offers similar functionality while being a bit more modular, EmbedIO offered a lot of stuff we weren't using.
We now also got rid of the Swan.Lite library included with EmbedIO which added a lot of annoying extension methods on very broad things like
object
This is very much a breaking change for plugins implementing their own controllers. However, any plugins that use the plugin endpoint API are unaffected by this change. I did drop support for
DataModelJsonPluginEndPoint
, it was already marked as obsolete and while it probably would've worked with GenHTTP I didn't want to waste time on it.Oh, and it's about 30% faster at some rudimentary benchmarks I ran.