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

hazendaz / httpunit / 755

14 Feb 2026 07:14PM UTC coverage: 80.526%. Remained the same
755

push

github

hazendaz
[ci] Fix badge

3213 of 4105 branches covered (78.27%)

Branch coverage included in aggregate %.

8245 of 10124 relevant lines covered (81.44%)

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
 * SPDX-License-Identifier: MIT
3
 * See LICENSE file for details.
4
 *
5
 * Copyright 2000-2026 Russell Gold
6
 * Copyright 2021-2000 hazendaz
7
 */
8
package com.meterware.httpunit;
9

10
import java.net.URL;
11

12
import org.w3c.dom.Element;
13

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

28
    /**
29
     * initialize me - set method to DELETE.
30
     */
31
    private void init() {
32
        super.setMethod("DELETE");
1✔
33
    }
1✔
34

35
    /**
36
     * Constructs a web request using a specific absolute url string.
37
     *
38
     * @param urlString
39
     *            the url string
40
     */
41
    public DeleteMethodWebRequest(String urlString) {
42
        super(urlString);
1✔
43
        init();
1✔
44
    }
1✔
45

46
    /**
47
     * Constructs a web request using a base URL and a relative url string.
48
     *
49
     * @param urlBase
50
     *            the url base
51
     * @param urlString
52
     *            the url string
53
     */
54
    public DeleteMethodWebRequest(URL urlBase, String urlString) {
55
        super(urlBase, urlString);
×
56
        init();
×
57
    }
×
58

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

74
    // --------------------------------------- package members ---------------------------------------------
75

76
    /**
77
     * Constructs a web request for a form submitted from JavaScript.
78
     *
79
     * @param sourceForm
80
     *            the source form
81
     */
82
    DeleteMethodWebRequest(WebForm sourceForm) {
83
        super(sourceForm);
×
84
        init();
×
85
    }
×
86

87
    /**
88
     * Constructs a web request for a link or image.
89
     *
90
     * @param source
91
     *            the source
92
     */
93
    DeleteMethodWebRequest(FixedURLWebRequestSource source) {
94
        super(source);
×
95
        init();
×
96
    }
×
97

98
    /**
99
     * Constructs a web request with a specific target.
100
     *
101
     * @param referer
102
     *            the referer
103
     * @param sourceElement
104
     *            the source element
105
     * @param urlBase
106
     *            the url base
107
     * @param urlString
108
     *            the url string
109
     * @param target
110
     *            the target
111
     */
112
    DeleteMethodWebRequest(WebResponse referer, Element sourceElement, URL urlBase, String urlString, String target) {
113
        super(referer, sourceElement, urlBase, urlString, target);
×
114
        init();
×
115
    }
×
116

117
    /**
118
     * Constructs an initial web request for a frame.
119
     *
120
     * @param urlBase
121
     *            the url base
122
     * @param urlString
123
     *            the url string
124
     * @param frame
125
     *            the frame
126
     */
127
    DeleteMethodWebRequest(URL urlBase, String urlString, FrameSelector frame) {
128
        super(urlBase, urlString, frame);
×
129
        init();
×
130
    }
×
131

132
    /**
133
     * Constructs a web request for a javascript open call.
134
     *
135
     * @param urlBase
136
     *            the url base
137
     * @param urlString
138
     *            the url string
139
     * @param frame
140
     *            the frame
141
     * @param target
142
     *            the target
143
     */
144
    DeleteMethodWebRequest(URL urlBase, String urlString, FrameSelector frame, String target) {
145
        super(urlBase, urlString, frame, target);
×
146
        init();
×
147
    }
×
148

149
    /**
150
     * Constructs a web request for a form.
151
     *
152
     * @param sourceForm
153
     *            the source form
154
     * @param parameterHolder
155
     *            the parameter holder
156
     * @param button
157
     *            the button
158
     * @param x
159
     *            the x
160
     * @param y
161
     *            the y
162
     */
163
    DeleteMethodWebRequest(WebForm sourceForm, ParameterHolder parameterHolder, SubmitButton button, int x, int y) {
164
        super(sourceForm, parameterHolder, button, x, y);
×
165
        init();
×
166
    }
×
167

168
}
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