Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
JENKINS-43147 - Added support to send body in delete method
- Loading branch information
Showing
2 changed files
with
47 additions
and
58 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/java/jenkins/plugins/http_request/util/HttpBodyDelete.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package jenkins.plugins.http_request.util; | ||
|
||
import java.net.URI; | ||
|
||
import org.apache.http.client.methods.HttpDelete; | ||
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; | ||
|
||
/** | ||
* @author Janario Oliveira | ||
* Add support to send body in delete method | ||
*/ | ||
public class HttpBodyDelete extends HttpEntityEnclosingRequestBase { | ||
public HttpBodyDelete(final String uri) { | ||
super(); | ||
setURI(URI.create(uri)); | ||
} | ||
|
||
@Override | ||
public String getMethod() { | ||
return HttpDelete.METHOD_NAME; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters