Issue http 405 for anything but POST on RPC

Fixes #481
This commit is contained in:
Joe Nelson
2016-02-01 22:52:57 -08:00
parent aec11e34a7
commit a0ef4eae4d
4 changed files with 13 additions and 2 deletions
+3
View File
@@ -386,6 +386,9 @@ spec struct c = around (withApp cfgDefault struct c) $ do
post "/rpc/sayhello" [json| { "name": "world" } |] `shouldRespondWith`
[json| [{"sayhello":"Hello, world"}] |]
it "currently supports POST only" $
get "/rpc/fake" `shouldRespondWith` 405 -- method not allowed
describe "weird requests" $ do
it "can query as normal" $ do
get "/Escap3e;" `shouldRespondWith`