Last active
June 30, 2021 07:13
-
-
Save gistlyn/6ac54b2ad298dff2cfae8552f8054dd6 to your computer and use it in GitHub Desktop.
formats
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppHost : AppHostBase | |
{ | |
public AppHost() : base("Web",typeof(MyServices).Assembly){} | |
public override void Configure(Container container) | |
{ | |
// Add additional format support by using Plugins | |
Plugins.Add(new MsgPackFormat()); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyServices : Service | |
{ | |
// HTML, JSON, CSV, XML and JSV enabled by default | |
public object Any(Hello request) => | |
new HelloResponse { | |
Result = $"Hello, {request.Name}" | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment