001: package com.meterware.httpunit;
002:
003: /********************************************************************************************************************
004: * $Id: GetMethodWebRequest.java,v 1.20 2004/06/30 23:54:48 russgold Exp $
005: *
006: * Copyright (c) 2000-2002, 2004, Russell Gold
007: *
008: * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
009: * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
010: * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
011: * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
012: *
013: * The above copyright notice and this permission notice shall be included in all copies or substantial portions
014: * of the Software.
015: *
016: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
017: * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
018: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
019: * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
020: * DEALINGS IN THE SOFTWARE.
021: *
022: *******************************************************************************************************************/
023: import java.net.URL;
024:
025: /**
026: * An HTTP request using the GET method.
027: **/
028: public class GetMethodWebRequest extends HeaderOnlyWebRequest {
029:
030: /**
031: * Constructs a web request using a specific absolute url string.
032: **/
033: public GetMethodWebRequest(String urlString) {
034: super (urlString);
035: }
036:
037: /**
038: * Constructs a web request using a base URL and a relative url string.
039: **/
040: public GetMethodWebRequest(URL urlBase, String urlString) {
041: super (urlBase, urlString);
042: }
043:
044: /**
045: * Constructs a web request with a specific target.
046: **/
047: public GetMethodWebRequest(URL urlBase, String urlString,
048: String target) {
049: super (urlBase, urlString, target);
050: }
051:
052: /**
053: * Returns the HTTP method defined for this request.
054: **/
055: public String getMethod() {
056: return "GET";
057: }
058:
059: //--------------------------------------- package members ---------------------------------------------
060:
061: /**
062: * Constructs a web request for a form submitted from JavaScript.
063: **/
064: GetMethodWebRequest(WebForm sourceForm) {
065: super (sourceForm);
066: }
067:
068: /**
069: * Constructs a web request for a link or image.
070: **/
071: GetMethodWebRequest(FixedURLWebRequestSource source) {
072: super (source);
073: }
074:
075: /**
076: * Constructs an initial web request for a frame.
077: **/
078: GetMethodWebRequest(URL urlBase, String urlString,
079: FrameSelector frame) {
080: super (urlBase, urlString, frame);
081: }
082:
083: /**
084: * Constructs a web request for a javascript open call.
085: **/
086: GetMethodWebRequest(URL urlBase, String urlString,
087: FrameSelector frame, String target) {
088: super (urlBase, urlString, frame, target);
089: }
090:
091: /**
092: * Constructs a web request for a form.
093: **/
094: GetMethodWebRequest(WebForm sourceForm,
095: ParameterHolder parameterHolder, SubmitButton button,
096: int x, int y) {
097: super(sourceForm, parameterHolder, button, x, y);
098: }
099:
100: }
|