Add a toString method to HttpResponse
package org.openqa.selenium.remote.http;
import static java.net.HttpURLConnection.HTTP_OK;
+import static org.openqa.selenium.remote.http.Contents.string;
public class HttpResponse extends HttpMessage<HttpResponse> {
@@ -52,4 +53,9 @@ public HttpResponse setTargetHost(String host) {
public String getTargetHost() {
return (String) getAttribute(HTTP_TARGET_HOST);
}
+
+ @Override
+ public String toString() {
+ return String.format("%s: %s", getStatus(), string(this));
+ }
}
