/** * Replaces the contents of the wrapped HttpMessage with the specified text contents, encoding them in the character set specified by the * message's Content-Type header. Note that this method does not update the Content-Type header, so if the content type will change as a * result of this call, the Content-Type header should be updated before calling this method. * * @param newContents new message contents */ public void setTextContents(String newContents) { HttpObjectUtil.replaceTextHttpEntityBody(httpMessage, newContents); // replaced the contents, so clear the local cache textContents = null; binaryContents = null; }
/** * Replaces the contents of the wrapped HttpMessage with the specified text contents, encoding them in the character set specified by the * message's Content-Type header. Note that this method does not update the Content-Type header, so if the content type will change as a * result of this call, the Content-Type header should be updated before calling this method. * * @param newContents new message contents */ public void setTextContents(String newContents) { HttpObjectUtil.replaceTextHttpEntityBody(httpMessage, newContents); // replaced the contents, so clear the local cache textContents = null; binaryContents = null; }
/** * Replaces the contents of the wrapped HttpMessage with the specified text contents, encoding them in the character set specified by the * message's Content-Type header. Note that this method does not update the Content-Type header, so if the content type will change as a * result of this call, the Content-Type header should be updated before calling this method. * * @param newContents new message contents */ public void setTextContents(String newContents) { HttpObjectUtil.replaceTextHttpEntityBody(httpMessage, newContents); // replaced the contents, so clear the local cache textContents = null; binaryContents = null; }