Package our.apache.commons.httpclient.methods

Examples of our.apache.commons.httpclient.methods.GetMethod


        // Add the paramters (these should already be encoded)
        fullURL.append(paramString);

        // Now (finally!) create a http connection based on the url built up
        GetMethod method = new GetMethod(fullURL.toString());

        boolean succeeded = false;

        try {
            // Execute the request, synchonizing on the HTTPHelper to ensure
            // it's safe for use by multiple threads.
            synchronized(httpHelper) {
                int statusCode = httpHelper.executeRequest(method,
                        fullURL.toString());
               
                // Convert the response code to a binary "did this send work or not"
                succeeded = (statusCode == HttpURLConnection.HTTP_OK);
            }
        } finally {
            // Release the connection.
            method.releaseConnection();
        }

        // Return send status
        return succeeded;
    }
View Full Code Here

TOP

Related Classes of our.apache.commons.httpclient.methods.GetMethod

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.