public class MetaDataServlet
extends javax.servlet.http.HttpServlet
The meta data Servlet serves meta data for a song.
The url is POST /v1.0/metadata
. The body of the POST
-request should contain
the following JSON: {id: 1506}
for the audio with identifier 1506.
The meta-data is available in a JSON file in a metadata directory. The contents of this file is send. e.g.
/opt/panako/metadata/1506.json
.
A GET-request results in the help-file.
Constructor and Description |
---|
MetaDataServlet() |
Modifier and Type | Method and Description |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doGet
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doPost
in class javax.servlet.http.HttpServlet
java.io.IOException
javax.servlet.ServletException