public class PostWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
BOUNDARY
The boundary string between multiparts
|
static java.lang.String |
ENCODING |
protected byte[] |
formDataPostBody
The form data that is going to be sent in post body
|
protected byte[] |
formDataUrlEncoded
The form data that is going to be sent as url encoded
|
Constructor and Description |
---|
PostWriter()
Constructor for PostWriter.
|
PostWriter(java.lang.String boundary)
Constructor for PostWriter
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getBoundary()
Get the boundary string, used to separate multiparts
|
java.lang.String |
sendPostData(java.net.URLConnection connection,
HTTPSamplerBase sampler)
Send POST data from Entry to the open connection.
|
void |
setHeaders(java.net.URLConnection connection,
HTTPSamplerBase sampler) |
protected static final java.lang.String BOUNDARY
public static final java.lang.String ENCODING
protected byte[] formDataUrlEncoded
protected byte[] formDataPostBody
public PostWriter()
public PostWriter(java.lang.String boundary)
boundary
- the boundary string to use as marker between multipart partspublic java.lang.String sendPostData(java.net.URLConnection connection, HTTPSamplerBase sampler) throws java.io.IOException
connection
- the open connection to use for sending datasampler
- sampler to get information about what to sendjava.io.IOException
- when writing data failspublic void setHeaders(java.net.URLConnection connection, HTTPSamplerBase sampler) throws java.io.IOException
java.io.IOException
protected java.lang.String getBoundary()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.