   @doc """
   Serialize a request or response an iolist
 
-  serialize_request(%{}) -> {iolist, :complete}
-  # Need to consider if parsing a request with not all body.
-  parse_request(iolist) -> {:ok, {request, :complete, iolist}}
-  # should this return request or [request, body, end]
-  parse_request(iolist) -> {:ok, {request, {:bytes, 50}, iolist}}
-
   Because of HEAD requests we should keep body separate
   ## Examples
 

          {:ok, headers, rest2} ->
            {headers, body, state} = decode_payload(headers)
            {:ok, %Raxx.Response{status: status, headers: headers, body: body}, state, rest2}
        end
    end
  end


    end
  end

  # TODO handle path nil
  defp start_line(%Raxx.Request{method: method, raw_path: path, query: query}) do
    query_string = if query, do: ["?", query], else: ""
    [Atom.to_string(method), " ", path, query_string, " HTTP/1.1", @crlf]
