Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/meterware/httpunit/GetMethodWebRequest.java


1   package com.meterware.httpunit;
2   /********************************************************************************************************************
3   * $Id: GetMethodWebRequest.java,v 1.20 2004/06/30 23:54:48 russgold Exp $
4   *
5   * Copyright (c) 2000-2002, 2004, Russell Gold
6   *
7   * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
8   * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
9   * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
10  * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in all copies or substantial portions
13  * of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
16  * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
18  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19  * DEALINGS IN THE SOFTWARE.
20  *
21  *******************************************************************************************************************/
22  import java.net.URL;
23  
24  /**
25   * An HTTP request using the GET method.
26   **/
27  public class GetMethodWebRequest extends HeaderOnlyWebRequest {
28  
29  
30      /**
31       * Constructs a web request using a specific absolute url string.
32       **/
33      public GetMethodWebRequest( String urlString ) {
34          super( urlString );
35      }
36  
37  
38      /**
39       * Constructs a web request using a base URL and a relative url string.
40       **/
41      public GetMethodWebRequest( URL urlBase, String urlString ) {
42          super( urlBase, urlString );
43      }
44  
45  
46      /**
47       * Constructs a web request with a specific target.
48       **/
49      public GetMethodWebRequest( URL urlBase, String urlString, String target ) {
50          super( urlBase, urlString, target );
51      }
52  
53  
54      /**
55       * Returns the HTTP method defined for this request.
56       **/
57      public String getMethod() {
58          return "GET";
59      }
60  
61  
62  //--------------------------------------- package members ---------------------------------------------
63  
64  
65      /**
66       * Constructs a web request for a form submitted from JavaScript.
67       **/
68      GetMethodWebRequest( WebForm sourceForm ) {
69          super( sourceForm );
70      }
71  
72  
73      /**
74       * Constructs a web request for a link or image.
75       **/
76      GetMethodWebRequest( FixedURLWebRequestSource source ) {
77          super( source );
78      }
79  
80  
81      /**
82       * Constructs an initial web request for a frame.
83       **/
84      GetMethodWebRequest( URL urlBase, String urlString, FrameSelector frame ) {
85          super( urlBase, urlString, frame );
86      }
87  
88  
89      /**
90       * Constructs a web request for a javascript open call.
91       **/
92      GetMethodWebRequest( URL urlBase, String urlString, FrameSelector frame, String target ) {
93          super( urlBase, urlString, frame, target );
94      }
95  
96  
97      /**
98       * Constructs a web request for a form.
99       **/
100     GetMethodWebRequest( WebForm sourceForm, ParameterHolder parameterHolder, SubmitButton button, int x, int y ) {
101         super( sourceForm, parameterHolder, button, x, y );
102     }
103 
104 
105 }
106 
107 
108 
109