Added toString() to DefaultHttpRequest/Response
This commit is contained in:
parent
3065a00d81
commit
e9793ee244
@ -22,6 +22,7 @@
|
||||
package org.jboss.netty.handler.codec.http;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* An http request implementation
|
||||
*
|
||||
@ -54,4 +55,9 @@ public class DefaultHttpRequest extends DefaultHttpMessage implements HttpReques
|
||||
public String getUri() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getMethod().toString() + ' ' + getUri() + ' ' + getProtocolVersion().getText();
|
||||
}
|
||||
}
|
||||
|
@ -43,4 +43,10 @@ public class DefaultHttpResponse extends DefaultHttpMessage implements HttpRespo
|
||||
public HttpResponseStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getProtocolVersion().getText() + ' ' + getStatus().toString();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user