Would the following conversion hold for converting from Java servlet to google app-engine cloud endpoint?
FROM
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException { … }
TO
@ApiMethod(name = "save_blob_key", path = "save_blob_key" httpMethod = HttpMethod.POST)
public void saveBlobKey(HttpServletRequest req) throws IOException { … }
CONTEXT:
I am trying to use endpoint to process blobstore callback.
Ref: https://developers.google.com/appengine/docs/java/blobstore/overview#Complete_Sample_App
PROBLEM:
The big hickup here is that the following two lines seem to require the class HttpServletRequest
and I don't know if I may pass it to endpoint.
BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
Map<String, List<BlobKey>> blobs = blobstoreService.getUploads(req);
EDIT:
I have been trying quite a lot of routes to solve this problem. My latest is combining blob servlet with endpoint api. Still I am not able to get the code to work. So the bounty goes to anyone who provides a solution or information that actually leads to a solution.