   @crlf "\r\n"
 
   @doc """
+  # NOTE set_body should add content-length otherwise we don't know if to delete it to match on other end, when serializing
+
   ## Examples
       iex> request = Raxx.request(:GET, "http://example.com/path?qs")
       ...> |> Raxx.set_header("accept", "text/plain")

    {head, body}
  end

  # @spec parse_request() :: {:}
  def parse do
  end

  @doc """
  TODO needs error case
  """
  def parse_chunk(buffer) do
    case String.split(buffer, "\r\n", parts: 2) do


        case rest do
          <<chunk::binary-size(size), "\r\n", rest::binary>> ->
            {:ok, {chunk, rest}}

          _incomplete_chunk ->
            {:ok, {nil, buffer}}
        end

      [rest] ->
        {:ok, {nil, rest}}
    end
  end

