THRIFT-1344 - fix http deprecation warning
authorAnthony F. Molinaro <molinaro@apache.org>
Thu, 22 Mar 2012 07:02:15 +0000 (07:02 +0000)
committerAnthony F. Molinaro <molinaro@apache.org>
Thu, 22 Mar 2012 07:02:15 +0000 (07:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1303671 13f79535-47bb-0310-9956-ffa450edef68

lib/erl/src/thrift_http_transport.erl

index 7d0226f..46bcede 100644 (file)
@@ -87,7 +87,7 @@ flush(State = #http_transport{host = Host,
             {State, ok};
         WBinary ->
             {ok, {{_Version, 200, _ReasonPhrase}, _Headers, Body}} =
-              http:request(post,
+              httpc:request(post,
                            {"http://" ++ Host ++ Path,
                             [{"User-Agent", "Erlang/thrift_http_transport"} | ExtraHeaders],
                             "application/x-thrift",
@@ -114,6 +114,3 @@ read(State = #http_transport{read_buffer = RBuf}, Len) when is_integer(Len) ->
         _ ->
             {State, {error, 'EOF'}}
     end.
-
-min(A,B) when A<B -> A;
-min(_,B)          -> B.