mirror of
https://github.com/edgurgel/httparrot
synced 2025-04-05 16:22:32 -04:00
Remove warnings
Unused stuff
This commit is contained in:
parent
2e08a8b6fd
commit
f4c2ee7466
2 changed files with 2 additions and 4 deletions
|
@ -1,6 +1,4 @@
|
||||||
defmodule HTTParrot.BasicAuthHandler do
|
defmodule HTTParrot.BasicAuthHandler do
|
||||||
alias HTTParrot.GeneralRequestInfo
|
|
||||||
|
|
||||||
def init(_transport, _req, _opts) do
|
def init(_transport, _req, _opts) do
|
||||||
{:upgrade, :protocol, :cowboy_rest}
|
{:upgrade, :protocol, :cowboy_rest}
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,12 +13,12 @@ defmodule HTTParrot.PostHandler do
|
||||||
{{"application", "x-www-form-urlencoded", :*}, :post_form}], req, state}
|
{{"application", "x-www-form-urlencoded", :*}, :post_form}], req, state}
|
||||||
end
|
end
|
||||||
|
|
||||||
def post_form(req, state) do
|
def post_form(req, _state) do
|
||||||
{:ok, body, req} = :cowboy_req.body_qs(req)
|
{:ok, body, req} = :cowboy_req.body_qs(req)
|
||||||
post(req, [form: body, data: "", json: nil])
|
post(req, [form: body, data: "", json: nil])
|
||||||
end
|
end
|
||||||
|
|
||||||
def post_json(req, state) do
|
def post_json(req, _state) do
|
||||||
{:ok, body, req} = :cowboy_req.body(req)
|
{:ok, body, req} = :cowboy_req.body(req)
|
||||||
post(req, [form: [{}], data: body, json: JSEX.decode!(body)])
|
post(req, [form: [{}], data: body, json: JSEX.decode!(body)])
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue