private HttpMethod httpMethod(WebRequest webRequest) { String httpMethod = webRequest.getHttpMethod().name(); return HttpMethod.valueOf(httpMethod); }
request.setHttpMethod(HttpMethod.valueOf(method.toUpperCase(Locale.ROOT)));
&& method.equals(HttpMethod.GET)) { final WebRequestSettings wrs = new WebRequestSettings(newUrl); wrs.setRequestParameters(parameters);
request.setAdditionalHeader(HttpHeader.REFERER, containingPage_.getUrl().toExternalForm()); request.setHttpMethod(HttpMethod.valueOf(method.toUpperCase(Locale.ROOT)));
&& method.equals(HttpMethod.GET)) { final WebRequestSettings wrs = new WebRequestSettings(newUrl); wrs.setRequestParameters(parameters);
public MockHttpServletRequest buildRequest(ServletContext servletContext) { Charset charset = getCharset(); String httpMethod = this.webRequest.getHttpMethod().name(); UriComponents uriComponents = uriComponents(); String path = uriComponents.getPath(); MockHttpServletRequest request = new HtmlUnitMockHttpServletRequest( servletContext, httpMethod, (path != null ? path : "")); parent(request, this.parentBuilder); String host = uriComponents.getHost(); request.setServerName(host != null ? host : ""); // needs to be first for additional headers authType(request); request.setCharacterEncoding(charset.name()); content(request, charset); contextPath(request, uriComponents); contentType(request); cookies(request); headers(request); locales(request); servletPath(uriComponents, request); params(request, uriComponents); ports(uriComponents, request); request.setProtocol("HTTP/1.1"); request.setQueryString(uriComponents.getQuery()); String scheme = uriComponents.getScheme(); request.setScheme(scheme != null ? scheme : ""); request.setPathInfo(null); return postProcess(request); }
request.setAdditionalHeader(HttpHeader.REFERER, containingPage_.getUrl().toExternalForm()); request.setHttpMethod(HttpMethod.valueOf(method.toUpperCase(Locale.ROOT)));
&& method.equals(HttpMethod.GET)) { final WebRequestSettings wrs = new WebRequestSettings(newUrl); wrs.setRequestParameters(parameters);
@Override public String getHttpMethod() { return request.getHttpMethod().name(); }
request.setHttpMethod(HttpMethod.valueOf(method.toUpperCase(Locale.ROOT)));
@Override public String getHttpMethod() { return request.getHttpMethod().name(); }
settings.setAdditionalHeader("Referer", containingPage_.getWebResponse().getRequestSettings().getUrl() .toExternalForm()); final HttpMethod submitMethod = HttpMethod.valueOf(method.toUpperCase()); settings.setHttpMethod(submitMethod); if (user != null) {
bduiler.append("fileName: '" + f.getName() + "', "); bduiler.append("contentType: '" + response.getContentType() + "', "); bduiler.append("method: '" + request.getHttpMethod().name() + "', "); if (request.getHttpMethod() == HttpMethod.POST && request.getEncodingType() == FormEncodingType.URL_ENCODED) { bduiler.append("postParameters: " + nameValueListToJsMap(request.getRequestParameters()) + ", ");
settings.setAdditionalHeader("Referer", containingPage_.getWebResponse().getRequestSettings().getUrl() .toExternalForm()); final HttpMethod submitMethod = HttpMethod.valueOf(method.toUpperCase()); settings.setHttpMethod(submitMethod); if (user != null) {
.append("fileName: '" + file.getName() + "', ") .append("contentType: '" + response.getContentType() + "', ") .append("method: '" + request.getHttpMethod().name() + "', "); if (request.getHttpMethod() == HttpMethod.POST && request.getEncodingType() == FormEncodingType.URL_ENCODED) { bduiler.append("postParameters: " + nameValueListToJsMap(request.getRequestParameters()) + ", ");
settings.setAdditionalHeader("Referer", containingPage_.getWebResponse().getRequestSettings().getUrl() .toExternalForm()); final HttpMethod submitMethod = HttpMethod.valueOf(method.toUpperCase()); settings.setHttpMethod(submitMethod); if (user != null) {
buffer.append("fileName: '" + f.getName() + "', "); buffer.append("contentType: '" + response.getContentType() + "', "); buffer.append("method: '" + settings.getHttpMethod().name() + "', "); if (settings.getHttpMethod() == HttpMethod.POST && settings.getEncodingType() == FormEncodingType.URL_ENCODED) { buffer.append("postParameters: " + nameValueListToJsMap(settings.getRequestParameters()) + ", ");
buffer.append("fileName: '" + f.getName() + "', "); buffer.append("contentType: '" + response.getContentType() + "', "); buffer.append("method: '" + settings.getHttpMethod().name() + "', "); if (settings.getHttpMethod() == HttpMethod.POST && settings.getEncodingType() == FormEncodingType.URL_ENCODED) { buffer.append("postParameters: " + nameValueListToJsMap(settings.getRequestParameters()) + ", ");
buffer.append("fileName: '" + f.getName() + "', "); buffer.append("contentType: '" + response.getContentType() + "', "); buffer.append("method: '" + settings.getHttpMethod().name() + "', "); if (settings.getHttpMethod() == HttpMethod.POST && settings.getEncodingType() == FormEncodingType.URL_ENCODED) { buffer.append("postParameters: " + nameValueListToJsMap(settings.getRequestParameters()) + ", ");