Use generic parent class (necessary to allow choosing HTTP implementation at run-time)

git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/trunk@1038771 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2010-11-24 19:23:26 +00:00
parent a423aca442
commit 01a1d771d9
2 changed files with 3 additions and 3 deletions

View File

@ -80,7 +80,7 @@ public class PostWriter {
* @return the post body sent. Actual file content is not returned, it
* is just shown as a placeholder text "actual file content"
*/
public String sendPostData(URLConnection connection, HTTPSampler sampler) throws IOException {
public String sendPostData(URLConnection connection, HTTPSamplerBase sampler) throws IOException {
// Buffer to hold the post body, except file content
StringBuilder postedBody = new StringBuilder(1000);
@ -161,7 +161,7 @@ public class PostWriter {
return postedBody.toString();
}
public void setHeaders(URLConnection connection, HTTPSampler sampler) throws IOException {
public void setHeaders(URLConnection connection, HTTPSamplerBase sampler) throws IOException {
// Get the encoding to use for the request
String contentEncoding = sampler.getContentEncoding();
if(contentEncoding == null || contentEncoding.length() == 0) {

View File

@ -42,7 +42,7 @@ public class PutWriter extends PostWriter {
}
@Override
public void setHeaders(URLConnection connection, HTTPSampler sampler) throws IOException {
public void setHeaders(URLConnection connection, HTTPSamplerBase sampler) throws IOException {
// Get the encoding to use for the request
String contentEncoding = sampler.getContentEncoding();
if(contentEncoding == null || contentEncoding.length() == 0) {