Skip to content

Commit

Permalink
Use setRequestMethod with method name as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
shrajfr12 committed Jun 22, 2023
1 parent 97833bc commit f7fdc55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion webhook/test/WebhookTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ executions {
write.setRequestProperty(k, v)
}
}
write.method = method
write.setRequestMethod(method)
write.doOutput = true
def writer = null, reader = null
try {
Expand Down
2 changes: 1 addition & 1 deletion webhook/webhook.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ class WebHook {
private String callPost(String urlString, String content) {
def url = new URL(urlString)
def post = url.openConnection()
post.method = "POST"
post.setRequestMethod("POST")
post.doOutput = true
post.setConnectTimeout(connectionTimeout)
post.setReadTimeout(connectionTimeout)
Expand Down

0 comments on commit f7fdc55

Please sign in to comment.