Sign in
apache
/
openwhisk-runtime-ruby
/
be869330798162e174433cfe98af3576741dcce3
/
.
/
core
/
ruby2.5Action
/
rackapp
/
middleware
/
post_method_validation.rb
blob: 8de8dba5ff30d3c302421bc04c527bdeca3a0a41 [
file
] [
log
] [
blame
]
require
"#{__dir__}/base.rb"
class
HTTPPostMethodValidation
<
MiddlewareBase
def
call
(
env
)
if
Rack
::
Request
.
new
(
env
).
request_method
==
'POST'
then
@app
.
call
(
env
)
else
Rack
::
Response
.
new
'Something went wrong with the request'
,
500
end
end
end