Package com.gargoylesoftware.htmlunit

Examples of com.gargoylesoftware.htmlunit.HttpMethod


     * @return the request settings
     */
    public WebRequestSettings getWebRequestSettings(final SubmittableElement submitElement) {
        final HtmlPage htmlPage = (HtmlPage) getPage();
        final List<NameValuePair> parameters = getParameterListForSubmit(submitElement);
        final HttpMethod method;
        final String methodAttribute = getMethodAttribute();
        if ("post".equalsIgnoreCase(methodAttribute)) {
            method = HttpMethod.POST;
        }
        else {
View Full Code Here


            final WebRequestSettings settings = new WebRequestSettings(fullUrl);
            settings.setCharset("UTF-8");
            settings.setAdditionalHeader("Referer", containingPage_.getWebResponse().getRequestSettings().getUrl()
                    .toExternalForm());
            final HttpMethod submitMethod = HttpMethod.valueOf(method.toUpperCase());
            settings.setHttpMethod(submitMethod);
            if (user != null) {
                final DefaultCredentialsProvider dcp = new DefaultCredentialsProvider();
                dcp.addCredentials(user, password);
                settings.setCredentialsProvider(dcp);
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.HttpMethod

Copyright © 2018 www.massapicom. 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.