-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Webhook URL from GitHub. fixes #336 @30m
- Loading branch information
みぞ@CrazyBeatCoder
committed
Feb 24, 2018
1 parent
2be6a6b
commit 3befbfc
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/main/java/com/mizo0203/komeiji/GitHubHookHandlerServlet.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,25 @@ | ||
package com.mizo0203.komeiji; | ||
|
||
import org.apache.commons.io.IOUtils; | ||
|
||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
import java.io.IOException; | ||
import java.nio.charset.StandardCharsets; | ||
import java.util.logging.Logger; | ||
|
||
public class GitHubHookHandlerServlet extends HttpServlet { | ||
|
||
private static final Logger LOG = Logger.getLogger(GitHubHookHandlerServlet.class.getName()); | ||
|
||
@Override | ||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { | ||
LOG.info(IOUtils.toString(req.getInputStream(), StandardCharsets.UTF_8)); | ||
} | ||
|
||
@Override | ||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { | ||
LOG.info(IOUtils.toString(req.getInputStream(), StandardCharsets.UTF_8)); | ||
} | ||
} |
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