       end
     end
 
-    defp read_body(pid, stream, mref, opts, acc \\ "") do
+    defp read_body(pid, stream, opts, acc \\ "") do
       limit = opts[:max_body]
 
       receive do

          {:ok, status, headers, ""}

        {:gun_response, ^pid, ^stream, :nofin, status, headers} ->
          mref = Process.monitor(pid)

          case read_body(pid, stream, mref, opts) do
            {:error, error} ->
              {:error, error}



        {:gun_data, ^pid, ^stream, :nofin, part} ->
          if limit - byte_size(part) >= 0 do
            read_body(pid, stream, opts, acc <> part)
          else
            {:error, "body too large"}
          end
