Open jamespercy opened 8 years ago
Hello, I'm really sorry for the delay... I see no issue with the code you provided. This kind of issue remains me another one: as GAE does not support request with chunked encoding, the client has to set the proper content-length header. In this case, the ClientResource class provides the "setEntityBuffering" method. Did you try to update the method as follow:
public void handleWelcomeNotification(Representation representation) {
LOG.info("representation.getText());
}
Another case is where the input entity has already been read, for example by a log, or Servlet filter. As the input stream can only be read once, this may be the cause of your issue.
I'm trying to set up a POST endpoint to receive messages from Google Pub/Sub using Restlet GAE edition. For some reason the request is received but the content is always missing. As a test I set up a standard servlet to handle the request and the content was delivered correctly so I'm 99% sure the issue is with Restlet.
here is how I set up my service:
and here's an example of one of the resources
Here is the class I'm mapping to:
I've tried various other representations with no success, so I'm sure it isn't a mapping issue.
I'm using the GAE edition of restlet 2.3.7 with the gson extension