Adds action which returns provided response in provided charset and status 200.

@param response response to return
@return response builder
498422
public HttpClientResponseBuilder doReturn(String response, Charset charset) {
        newRule.addAction(new StringResponse(response, charset));
        return new HttpClientResponseBuilder(newRule);
    }
1250986
protected Token responseToToken(Map<String, String> response) {
		return new Token(response.get(OAUTH_TOKEN), response.get(OAUTH_TOKEN_SECRET));
	}
1279481
def get_charset(response):
    
    # Set default charset
    charset = DEFAULT_CHARSET

    m = re.findall(r';charset=(.*)', response.get('mimeType', ''))
    if m:
        charset = m[0]

    return charset
1140863
@Override
    protected Long logResponse(Response response) {
        Long responseId = super.logResponse(response);
        int code = response.getStatusCode() == null ? 0 : response.getStatusCode();
        String message = response.getStatusMessage() == null ? StatusResponse.forCode(code).getStatus().getMessage() :
                response.getStatusMessage();
        Status status = new Status(code, message);
        try {
            updateServiceSummary(status, responseId);
        }
        catch (ActivityException | SQLException ex) {
            logexception(ex.getMessage(), ex);
        }
        return responseId;
    }
824903
private void setResponeHeaders(HttpServletResponse response) {

        response.setHeader("Cache-Control", "no-store, no-cache");
        response.setHeader("Pragma", "no-cache");
        response.setDateHeader("Expires", System.currentTimeMillis());
        response.setContentType("text/plain; charset=utf-8");
        response.setCharacterEncoding("utf-8");
    }
174502
private static Map<String, String> splitResponse(String response) {
		String[] params = response.split("&");
		Map<String, String> result = new HashMap<>(params.length);
		for (String p : params) {
			String[] kv = p.split("=");
			result.put(PercentEncoding.decode(kv[0]), PercentEncoding.decode(kv[1]));
		}
		return result;
	}
1319330
public void setResponse(JsonRpcResponse response) {
    if (response.isError()) {
      setException(response.error());
      return;
    }

    try {
      set((V) Messages.fromJson(method.outputBuilder(), response.result()));
    } catch (Exception e) {
      setException(e);
    }
  }
236188
protected final <R extends RaftResponse> R logResponse(R response) {
    log.trace("Sending {}", response);
    return response;
  }
47296
public void setResponse(String response) {
		this.response = response;
		try {
			this.responseLength = response.getBytes("UTF-8").length;
		} catch (UnsupportedEncodingException e) {
			this.responseLength = response.length();
		}
	}
159772
function mapResponse(response) {
  response.body = response.text;
  response.statusCode = response.status;
  return response;
}
98216
public static String getResponseHeadersOutput(Response response) {
        if (response == null) {
            return "";
        }
        StringBuilder responseHeaders = new StringBuilder();
        String uuid = getUUID();
        responseHeaders.append(ONCLICK_TOGGLE).append(uuid).append("\")'>Toggle Headers</a> ");
        responseHeaders.append(SPAN_ID).append(uuid).append(DISPLAY_NONE);
        responseHeaders.append(formatKeyPair(response.getHeaders()));
        responseHeaders.append(END_SPAN);
        return responseHeaders.toString();
    }
1004110
PollingState<T> withResponse(Response<ResponseBody> response) {
        this.response = response;
        withPollingUrlFromResponse(response);
        withPollingRetryTimeoutFromResponse(response);
        return this;
    }
1186839
public static String getResponseAsString(String uri, String charsetName) {
        return HttpRequester.getResponseAsString(uri, charsetName);
    }
81726
public void processResponse(ResponseEvent response) {
    ClientTransaction trans = response.getClientTransaction();
    if (trans == null) {
      return;
    }

    SipTransaction sip_trans = null;

    synchronized (respTransactions) {
      sip_trans = (SipTransaction) respTransactions.get(trans);
    }

    if (sip_trans == null) {
      return;
    }

    if (response.getResponse().getStatusCode() > 199) {
      synchronized (respTransactions) {
        respTransactions.remove(trans);
      }
    }

    // check for listener handling
    MessageListener listener = sip_trans.getClientListener();
    if (listener != null) {
      listener.processEvent(response);
      return;
    }

    // if no listener, use the default blocking mechanism
    synchronized (sip_trans.getBlock()) {
      sip_trans.getEvents().addLast(response);
      sip_trans.getBlock().notifyEvent();
    }
  }
1020381
public void addResponseProp(String key, String value) {
        if (responseProps == null) {
            responseProps = new HashMap<String, String>(16);
        }
        if (key != null && value != null) {
            responseProps.put(key, value);
        }
    }
886326
public static <T> GenericResponseBuilder<T> fromResponse(GenericResponse<T> response) {
    GenericResponseBuilder<T> builder =
        genericResponseBuilderFactory.create(response.getStatus(), response.body());

    for (String headerName : response.getHeaders().keySet()) {
      List<Object> headerValues = response.getHeaders().get(headerName);
      for (Object headerValue : headerValues) {
        builder.header(headerName, headerValue);
      }
    }
    return builder;
  }
757472
function onResponse( response ) {
		if ( response.statusCode !== 200 ) {
			err = {
				'status': response.statusCode,
				'message': ''
			};
		}
		debug( 'Received a response from query endpoint.' );
		debug( 'Response status: %s.', response.statusCode );
		debug( 'Response headers: %s', JSON.stringify( response.headers ) );

		response.setEncoding( 'utf8' );
		response.on( 'data', onData );
		response.on( 'end', onEnd );
	}