jgen.writeObjectField("path", httpRequest.getPath()); if (httpRequest.getQueryStringParameterList() != null && !httpRequest.getQueryStringParameterList().isEmpty()) { jgen.writeObjectField("queryStringParameters", httpRequest.getQueryStringParameters());
outputQueryStringParameter(numberOfSpacesToIndent + 1, output, request.getQueryStringParameterList()); if (request.isSecure() != null) { appendNewLineAndIndent((numberOfSpacesToIndent + 1) * INDENT_SIZE, output);
public String getURI(HttpRequest httpRequest) { QueryStringEncoder queryStringEncoder = new QueryStringEncoder(httpRequest.getPath().getValue()); for (Parameter parameter : httpRequest.getQueryStringParameterList()) { for (NottableString value : parameter.getValues()) { queryStringEncoder.addParam(parameter.getName().getValue(), value.getValue()); } } return queryStringEncoder.toString(); }
public HttpRequestTemplateObject(HttpRequest httpRequest) { if (httpRequest != null) { method = httpRequest.getMethod().getValue(); path = httpRequest.getPath().getValue(); for (Header header : httpRequest.getHeaderList()) { headers.put(header.getName().getValue(), Lists.transform(header.getValues(), new Function<NottableString, String>() { public String apply(NottableString input) { return input.getValue(); } })); } for (Cookie cookie : httpRequest.getCookieList()) { cookies.put(cookie.getName().getValue(), cookie.getValue().getValue()); } for (Parameter parameter : httpRequest.getQueryStringParameterList()) { queryStringParameters.put(parameter.getName().getValue(), Lists.transform(parameter.getValues(), new Function<NottableString, String>() { public String apply(NottableString input) { return input.getValue(); } })); } body = BodyDTO.createDTO(httpRequest.getBody()); keepAlive = httpRequest.isKeepAlive(); secure = httpRequest.isSecure(); } }
public HttpRequest update(HttpRequest replaceRequest) { if (!Strings.isNullOrEmpty(replaceRequest.getMethod().getValue())) { withMethod(replaceRequest.getMethod()); } if (!Strings.isNullOrEmpty(replaceRequest.getPath().getValue())) { withPath(replaceRequest.getPath()); } for (Header header : replaceRequest.getHeaderList()) { getHeaders().replaceEntry(header); } for (Cookie cookie : replaceRequest.getCookieList()) { withCookie(cookie); } for (Parameter parameter : replaceRequest.getQueryStringParameterList()) { getQueryStringParameters().replaceEntry(parameter); } if (replaceRequest.getBody() != null) { withBody(replaceRequest.getBody()); } if (replaceRequest.isSecure() != null) { withSecure(replaceRequest.isSecure()); } if (replaceRequest.isKeepAlive() != null) { withKeepAlive(replaceRequest.isKeepAlive()); } return this; } }
jgen.writeObjectField("path", httpRequest.getPath()); if (httpRequest.getQueryStringParameterList() != null && !httpRequest.getQueryStringParameterList().isEmpty()) { jgen.writeObjectField("queryStringParameters", httpRequest.getQueryStringParameters());
outputQueryStringParameter(numberOfSpacesToIndent + 1, output, request.getQueryStringParameterList()); if (request.isSecure() != null) { appendNewLineAndIndent((numberOfSpacesToIndent + 1) * INDENT_SIZE, output);
public String getURI(HttpRequest httpRequest) { QueryStringEncoder queryStringEncoder = new QueryStringEncoder(httpRequest.getPath().getValue()); for (Parameter parameter : httpRequest.getQueryStringParameterList()) { for (NottableString value : parameter.getValues()) { queryStringEncoder.addParam(parameter.getName().getValue(), value.getValue()); } } return queryStringEncoder.toString(); }
public HttpRequestTemplateObject(HttpRequest httpRequest) { if (httpRequest != null) { method = httpRequest.getMethod().getValue(); path = httpRequest.getPath().getValue(); for (Header header : httpRequest.getHeaderList()) { headers.put(header.getName().getValue(), Lists.transform(header.getValues(), new Function<NottableString, String>() { public String apply(NottableString input) { return input.getValue(); } })); } for (Cookie cookie : httpRequest.getCookieList()) { cookies.put(cookie.getName().getValue(), cookie.getValue().getValue()); } for (Parameter parameter : httpRequest.getQueryStringParameterList()) { queryStringParameters.put(parameter.getName().getValue(), Lists.transform(parameter.getValues(), new Function<NottableString, String>() { public String apply(NottableString input) { return input.getValue(); } })); } body = BodyDTO.createDTO(httpRequest.getBody()); keepAlive = httpRequest.isKeepAlive(); secure = httpRequest.isSecure(); } }
public HttpRequest update(HttpRequest replaceRequest) { if (!Strings.isNullOrEmpty(replaceRequest.getMethod().getValue())) { withMethod(replaceRequest.getMethod()); } if (!Strings.isNullOrEmpty(replaceRequest.getPath().getValue())) { withPath(replaceRequest.getPath()); } for (Header header : replaceRequest.getHeaderList()) { getHeaders().replaceEntry(header); } for (Cookie cookie : replaceRequest.getCookieList()) { withCookie(cookie); } for (Parameter parameter : replaceRequest.getQueryStringParameterList()) { getQueryStringParameters().replaceEntry(parameter); } if (replaceRequest.getBody() != null) { withBody(replaceRequest.getBody()); } if (replaceRequest.isSecure() != null) { withSecure(replaceRequest.isSecure()); } if (replaceRequest.isKeepAlive() != null) { withKeepAlive(replaceRequest.isKeepAlive()); } return this; } }