Last active
May 12, 2018 19:05
-
-
Save thiagoloureiro/5ff87045414a15a160e28d5bc3b625a0 to your computer and use it in GitHub Desktop.
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 sealed class MessageBrokerModule : NancyModule | |
| { | |
| public MessageBrokerModule() | |
| { | |
| Get("/", args => "Service Status OK"); | |
| Post("/", args => | |
| { | |
| var obj = this.BindAndValidate<RootObject>(); | |
| if (!this.ModelValidationResult.IsValid) | |
| return 422; | |
| var objRabbit = new MessageBroker(); | |
| objRabbit.WriteMessageOnQueue("AppVeyor", JsonConvert.SerializeObject(obj)); | |
| return obj; | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment