Thank you for answering my question,
But still, what is the usage of setting a valid value, What is the benefit
over setting Content-Type header parameter?

On Tue, Dec 25, 2018 at 3:59 PM glin...@live.com <glin...@live.com> wrote:

> It is being used at least:
>
>  1. For  setting request header
> <
> https://github.com/apache/jmeter/blob/v5_0/src/protocol/http/org/apache/jmeter/protocol/http/sampler/PostWriter.java#L315>
>
>  2. For  encoding POST request data
> <
> https://github.com/apache/jmeter/blob/v5_0/src/protocol/http/org/apache/jmeter/protocol/http/sampler/PostWriter.java#L320>
>
>  3. For  encoding query string
> <
> https://github.com/apache/jmeter/blob/v5_0/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java#L1121>
>
>
> The easiest way of testing this is setting Content Encoding to something,
> which cannot be resolved to a  Java Charset
> <
> https://docs.oracle.com/javase/8/docs/api/index.html?java/nio/charset/StandardCharsets.html>
>
> , in this case you will immediately get an  UnsupportedCharsetException
> <
> https://docs.oracle.com/javase/8/docs/api/java/nio/charset/UnsupportedCharsetException.html>
>
>
> Another option of testing this is using  View Results Tree
> <https://www.blazemeter.com/blog/how-debug-your-apache-jmeter-script>
> listener, if you leave the Content Encoding input blank - JMeter will send
> default charset (UTF-8). If you set the encoding of your choice - JMeter
> will add this as the  Content-Type header
> <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type>
> *charset* parameter
>
> <
> http://www.jmeter-archive.org/file/t340375/Screenshot_2018-12-25_at_14.png>
>
>
>
>
>
>
> --
> Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> For additional commands, e-mail: user-h...@jmeter.apache.org
>
>

Reply via email to