   * opts     - Keyword opts to be passed to adapter (hackney/httpoison)
     * `file` - option to  be passed if the output should be saved to a file.
   """
-  @spec request(method, url, body, headers, opts) :: {:ok, Response.t} | {:error, term}
+  @spec request(method, url, body, headers, opts)
+    :: {:ok, Response.t} | {:error, term}
   def request(method, url, body \\ "", headers \\ [], opts \\ [])
 
   def request(method, url, body, headers, opts) do
-    GenServer.call(__MODULE__, {:request, method, url, body, headers, opts}, :infinity)
+    call = {:request, method, url, body, headers, opts}
+    GenServer.call(__MODULE__, call, :infinity)
   end
 
   @doc "Same as `request/5` but raises."

  use GenServer
  alias Farmbot.HTTP.{Adapter, Error, Response}

  @adapter Application.get_env(:farmbot, :behaviour)[:http_adapter] || raise("No http adapter.")

  @typep method :: Adapter.method
  @typep url :: Adapter.url


  def request!(method, url, body, headers, opts) do
    case request(method, url, body, headers, opts) do
      {:ok, %Response{status_code: code} = resp}
        when code > 199 and code < 300 -> resp

      {:ok, %Response{} = resp} -> raise Error, resp

      {:error, reason} -> raise Error, reason
