You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2009/11/17 19:09:44 UTC
svn commit: r881424 -
/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
Author: sebb
Date: Tue Nov 17 18:09:44 2009
New Revision: 881424
URL: http://svn.apache.org/viewvc?rev=881424&view=rev
Log:
Add convenience method setResponseNoContent()
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java?rev=881424&r1=881423&r2=881424&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java (original)
+++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java Tue Nov 17 18:09:44 2009
@@ -18,6 +18,7 @@
package org.apache.jmeter.protocol.http.sampler;
+import java.net.HttpURLConnection;
import java.net.URL;
import org.apache.jmeter.protocol.http.util.HTTPConstants;
@@ -37,6 +38,9 @@
private String queryString = ""; // never null
+ private static final String HTTP_NO_CONTENT_CODE = Integer.toString(HttpURLConnection.HTTP_NO_CONTENT);
+ private static final String HTTP_NO_CONTENT_MSG = "No Content"; // $NON-NLS-1$
+
public HTTPSampleResult() {
super();
setDataEncoding(DEFAULT_HTTP_ENCODING); // default if encoding not provided be the page
@@ -198,4 +202,9 @@
}
return super.getDataEncodingWithDefault();
}
+
+ public void setResponseNoContent(){
+ setResponseCode(HTTP_NO_CONTENT_CODE);
+ setResponseMessage(HTTP_NO_CONTENT_MSG);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org