Class PostWriter
-
- All Implemented Interfaces:
public class PostWriter
Class for setting the necessary headers for a POST request, and sending the body of the POST.
-
-
Constructor Summary
Constructors Constructor Description PostWriter()
Constructor for PostWriter. PostWriter(String boundary)
Constructor for PostWriter
-
Method Summary
Modifier and Type Method Description String
sendPostData(URLConnection connection, HTTPSamplerBase sampler)
Send POST data from Entry to the open connection. void
setHeaders(URLConnection connection, HTTPSamplerBase sampler)
-
-
Constructor Detail
-
PostWriter
PostWriter()
Constructor for PostWriter.
-
PostWriter
PostWriter(String boundary)
Constructor for PostWriter- Parameters:
boundary
- the boundary string to use as marker between multipart parts
-
-
Method Detail
-
sendPostData
String sendPostData(URLConnection connection, HTTPSamplerBase sampler)
Send POST data from Entry to the open connection.
- Parameters:
connection
- the open connection to use for sending datasampler
- sampler to get information about what to send- Returns:
the post body sent. Actual file content is not returned, it is just shown as a placeholder text "actual file content"
-
setHeaders
void setHeaders(URLConnection connection, HTTPSamplerBase sampler)
-
-
-
-