I am using Postman to test out the API, the server port is 3001
enter image description here
for example
// @RequestMapping(value = "/getSongById/{songId}", method = RequestMethod.GET)
@GetMapping(value = "/getSongById/{songId}")
public @ResponseBody Map<String, Object> getSongById(@PathVariable("songId") String songId,
HttpServletRequest request) {
Map<String, Object> response = new HashMap<String, Object>();
response.put("path", String.format("GET %s", Utils.getUrl(request)));
DbQueryStatus dbQueryStatus = songDal.findSongById(songId);
response.put("message", dbQueryStatus.getMessage());
response = Utils.setResponseStatus(response, dbQueryStatus.getdbQueryExecResult(), dbQueryStatus.getData());
return response;
}
i was trying out this part on postman but got this
{
"path": "POST http://localhost:3001/addSong",
"message": "POST",
"status": "INTERNAL_SERVER_ERROR"
}
but for some reason I’m getting this error
New contributor
Sid is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.