• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / httpunit / 656

06 Dec 2025 09:11PM UTC coverage: 80.452% (+0.02%) from 80.435%
656

push

github

hazendaz
[maven-release-plugin] prepare for next development iteration

3213 of 4105 branches covered (78.27%)

Branch coverage included in aggregate %.

8245 of 10137 relevant lines covered (81.34%)

0.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

17.24
/src/main/java/com/meterware/httpunit/DeleteMethodWebRequest.java
1
/*
2
 * MIT License
3
 *
4
 * Copyright 2011-2025 Russell Gold
5
 *
6
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
7
 * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
8
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
9
 * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
 *
11
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions
12
 * of the Software.
13
 *
14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
15
 * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
17
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18
 * DEALINGS IN THE SOFTWARE.
19
 */
20
package com.meterware.httpunit;
21

22
import java.net.URL;
23

24
import org.w3c.dom.Element;
25

26
/**
27
 * An HTTP request using the DELETE method. RFC 2616 http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html defines: 9.7
28
 * DELETE The DELETE method requests that the origin server delete the resource identified by the Request-URI. This
29
 * method MAY be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed
30
 * that the operation has been carried out, even if the status code returned from the origin server indicates that the
31
 * action has been completed successfully. However, the server SHOULD NOT indicate success unless, at the time the
32
 * response is given, it intends to delete the resource or move it to an inaccessible location. A successful response
33
 * SHOULD be 200 (OK) if the response includes an entity describing the status, 202 (Accepted) if the action has not yet
34
 * been enacted, or 204 (No Content) if the action has been enacted but the response does not include an entity. If the
35
 * request passes through a cache and the Request-URI identifies one or more currently cached entities, those entries
36
 * SHOULD be treated as stale. Responses to this method are not cacheable.
37
 **/
38
public class DeleteMethodWebRequest extends HeaderOnlyWebRequest {
39

40
    /**
41
     * initialize me - set method to DELETE.
42
     */
43
    private void init() {
44
        super.setMethod("DELETE");
1✔
45
    }
1✔
46

47
    /**
48
     * Constructs a web request using a specific absolute url string.
49
     *
50
     * @param urlString
51
     *            the url string
52
     */
53
    public DeleteMethodWebRequest(String urlString) {
54
        super(urlString);
1✔
55
        init();
1✔
56
    }
1✔
57

58
    /**
59
     * Constructs a web request using a base URL and a relative url string.
60
     *
61
     * @param urlBase
62
     *            the url base
63
     * @param urlString
64
     *            the url string
65
     */
66
    public DeleteMethodWebRequest(URL urlBase, String urlString) {
67
        super(urlBase, urlString);
×
68
        init();
×
69
    }
×
70

71
    /**
72
     * Constructs a web request with a specific target.
73
     *
74
     * @param urlBase
75
     *            the url base
76
     * @param urlString
77
     *            the url string
78
     * @param target
79
     *            the target
80
     */
81
    public DeleteMethodWebRequest(URL urlBase, String urlString, String target) {
82
        super(urlBase, urlString, target);
×
83
        init();
×
84
    }
×
85

86
    // --------------------------------------- package members ---------------------------------------------
87

88
    /**
89
     * Constructs a web request for a form submitted from JavaScript.
90
     *
91
     * @param sourceForm
92
     *            the source form
93
     */
94
    DeleteMethodWebRequest(WebForm sourceForm) {
95
        super(sourceForm);
×
96
        init();
×
97
    }
×
98

99
    /**
100
     * Constructs a web request for a link or image.
101
     *
102
     * @param source
103
     *            the source
104
     */
105
    DeleteMethodWebRequest(FixedURLWebRequestSource source) {
106
        super(source);
×
107
        init();
×
108
    }
×
109

110
    /**
111
     * Constructs a web request with a specific target.
112
     *
113
     * @param referer
114
     *            the referer
115
     * @param sourceElement
116
     *            the source element
117
     * @param urlBase
118
     *            the url base
119
     * @param urlString
120
     *            the url string
121
     * @param target
122
     *            the target
123
     */
124
    DeleteMethodWebRequest(WebResponse referer, Element sourceElement, URL urlBase, String urlString, String target) {
125
        super(referer, sourceElement, urlBase, urlString, target);
×
126
        init();
×
127
    }
×
128

129
    /**
130
     * Constructs an initial web request for a frame.
131
     *
132
     * @param urlBase
133
     *            the url base
134
     * @param urlString
135
     *            the url string
136
     * @param frame
137
     *            the frame
138
     */
139
    DeleteMethodWebRequest(URL urlBase, String urlString, FrameSelector frame) {
140
        super(urlBase, urlString, frame);
×
141
        init();
×
142
    }
×
143

144
    /**
145
     * Constructs a web request for a javascript open call.
146
     *
147
     * @param urlBase
148
     *            the url base
149
     * @param urlString
150
     *            the url string
151
     * @param frame
152
     *            the frame
153
     * @param target
154
     *            the target
155
     */
156
    DeleteMethodWebRequest(URL urlBase, String urlString, FrameSelector frame, String target) {
157
        super(urlBase, urlString, frame, target);
×
158
        init();
×
159
    }
×
160

161
    /**
162
     * Constructs a web request for a form.
163
     *
164
     * @param sourceForm
165
     *            the source form
166
     * @param parameterHolder
167
     *            the parameter holder
168
     * @param button
169
     *            the button
170
     * @param x
171
     *            the x
172
     * @param y
173
     *            the y
174
     */
175
    DeleteMethodWebRequest(WebForm sourceForm, ParameterHolder parameterHolder, SubmitButton button, int x, int y) {
176
        super(sourceForm, parameterHolder, button, x, y);
×
177
        init();
×
178
    }
×
179

180
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc