davisp commented on a change in pull request #1129: Elixir suite davisp
URL: https://github.com/apache/couchdb/pull/1129#discussion_r164226233
 
 

 ##########
 File path: test/elixir/lib/couch.ex
 ##########
 @@ -72,4 +131,35 @@ defmodule Couch do
         %HTTPotion.ErrorResponse{ message: error_to_string(reason)}
     end
   end
+
+  # Anther HACK: Until we can get process_request_headers/2 merged
+  # upstream.
+  @spec process_arguments(atom, String.t, [{atom(), any()}]) :: %{}
+  defp process_arguments(method, url, options) do
+    options    = process_options(options)
+
+    body       = Keyword.get(options, :body, "")
+    headers    = Keyword.merge Application.get_env(:httpotion, 
:default_headers, []), Keyword.get(options, :headers, [])
 
 Review comment:
   For the parens vs. no parens, I have yet to distinguish or come up with a 
general rule of thumb for when to use them. However the number of ways things 
parse weirdly I'm inclined to say almost never leave them out.
   
   That said, this particular functions i copy pasted from the HTTPotion 
library and only exists as a copy here so that we can use the 
process_request_headers/2 callback on line 159. Assuming we can get upstream to 
take that minor patch we'll be able to get rid of this function copy.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to