Examples of ResponseCreator


Examples of org.springframework.test.web.client.ResponseCreator

   * @deprecated in favor of methods returning DefaultResponseCreator
   */
  public static ResponseCreator withResponse(final String body, final HttpHeaders headers,
      final HttpStatus statusCode, final String statusText) {

    return new ResponseCreator() {
      public MockClientHttpResponse createResponse(ClientHttpRequest request) throws IOException {
        MockClientHttpResponse response = new MockClientHttpResponse(body.getBytes("UTF-8"), statusCode);
        response.getHeaders().putAll(headers);
        return response;
      }
View Full Code Here

Examples of org.springframework.test.web.client.ResponseCreator

   * @deprecated in favor of methods 'withXyz' in this class returning DefaultResponseCreator
   */
  public static ResponseCreator withResponse(final Resource body, final HttpHeaders headers,
      final HttpStatus statusCode, String statusText) {

    return new ResponseCreator() {
      public MockClientHttpResponse createResponse(ClientHttpRequest request) throws IOException {
        MockClientHttpResponse response = new MockClientHttpResponse(body.getInputStream(), statusCode);
        response.getHeaders().putAll(headers);
        return response;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.