/** * <p>Creates a new response with the given body, a suitable default status * code and a given content-type.</p> * <p>If the content given is null a 204 status code is given, otherwise 200.</p> * * @param content * The content of the response * @param contentType * The content type */ public ClientDriverResponse(String content, String contentType) { this(convertStringToByteArray(content), contentType); }
/** * <p>Creates a new response with the given body, a suitable default status * code and a given content-type.</p> * <p>If the content given is null a 204 status code is given, otherwise 200.</p> * * @param content * The content of the response * @param contentType * The content type */ public ClientDriverResponse(String content, String contentType) { this(convertStringToByteArray(content), contentType); }
/** * <p>Creates a new response with the given body, a suitable default status * code and a Content-Type of 'text/plain'.</p> * <p>If the content given is null a 204 status code is given, otherwise 200.</p> * * @param content * The content of the response * @deprecated Use {@link #ClientDriverResponse(String, String)} instead. */ @Deprecated public ClientDriverResponse(String content) { this(convertStringToByteArray(content), DEFAULT_TEXT_CONTENT_TYPE); }
/** * <p>Creates a new response with the given body, a suitable default status * code and a Content-Type of 'text/plain'.</p> * <p>If the content given is null a 204 status code is given, otherwise 200.</p> * * @param content * The content of the response * @deprecated Use {@link #ClientDriverResponse(String, String)} instead. */ @Deprecated public ClientDriverResponse(String content) { this(convertStringToByteArray(content), DEFAULT_TEXT_CONTENT_TYPE); }