fix as_string for response/request objects