@@ -12,7 +12,7 @@ defmodule Avrora.HTTPClient do
1212 def get ( url , options \\ [ ] ) do
1313 with { :ok , headers } <- extract_headers ( options ) ,
1414 { :ok , ssl_options } <- extract_ssl ( options ) ,
15- { :ok , { { _ , status , _ } , _ , body } } <- :httpc . request ( :get , { ' #{ url } ' , headers } , [ ssl: ssl_options ] , [ ] ) do
15+ { :ok , { { _ , status , _ } , _ , body } } <- :httpc . request ( :get , { ~c ( #{ url } ) , headers } , [ ssl: ssl_options ] , [ ] ) do
1616 handle ( status , body )
1717 end
1818 end
@@ -25,7 +25,7 @@ defmodule Avrora.HTTPClient do
2525 { :ok , headers } <- extract_headers ( options ) ,
2626 { :ok , ssl_options } <- extract_ssl ( options ) ,
2727 { :ok , { { _ , status , _ } , _ , body } } <-
28- :httpc . request ( :post , { ' #{ url } ' , headers , [ content_type ] , body } , [ ssl: ssl_options ] , [ ] ) do
28+ :httpc . request ( :post , { ~c ( #{ url } ) , headers , [ content_type ] , body } , [ ssl: ssl_options ] , [ ] ) do
2929 handle ( status , body )
3030 end
3131 end
@@ -34,12 +34,12 @@ defmodule Avrora.HTTPClient do
3434 authorization =
3535 case Keyword . get ( options , :authorization ) do
3636 nil -> [ ]
37- credentials -> [ { ' Authorization' , ' #{ credentials } ' } ]
37+ credentials -> [ { ~C ( Authorization) , ~c ( #{ credentials } ) } ]
3838 end
3939
4040 case Keyword . get ( options , :user_agent ) do
4141 nil -> { :ok , authorization }
42- user_agent -> { :ok , [ { ' User-Agent' , ' #{ user_agent } ' } | authorization ] }
42+ user_agent -> { :ok , [ { ~C ( User-Agent) , ~c ( #{ user_agent } ) } | authorization ] }
4343 end
4444 end
4545
0 commit comments