I have an HTTP GET defined like below in a spark-java microservice, that using POI, will return the Word document's text.
The problem I have (and it's probably simple to fix), is that I can't pass a path to the GET since it misinterprets it.
I've tried escaping the path, putting name=value, quotes, etc., but it doesn't work yet.
If I set the path inside the actual micro-service, then it's all good. Therefore, I'm just confused how to set a path in the GET.
Should be something close to: $curl localhost:4567/docxtext/Test.docx
(but allowing a path for the "Text.docx" part -- for example, "./Test.docx")
Thanks for any suggestions!
m
get("/docxtext/:docName", (request, response) -> { return getWordDocText(request.params("docName")); });
It can be solved by using query params, like the following: