I've set up a Google App Engine
application to respond to various HttpPosts
and store various bits of information. For some reason in one of my HttpServlets
, I am unable to respond back to an HttpPost
. I know I've completed this in a similar fashion before but have been unable to figure out the solution neither from trial/attempt nor stackoverflow questions.
Here, my servlet receives the post with no problem:
@Override
public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
//I do some random processing and storing of data
//Then I respond with a String dependent upon the info I'm given
resp.setContentType("application/JSON");
PrintWriter out = resp.getWriter();
out.print(myResponse);
out.close();
}
I never receive the actual response data back however. The method below is never called. I've set the NSURLConnectionDelegate
.
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data;
Does anyone know why this might be?? I'm considering switching to an HttpGet
but I know for sure I've done this with an HttpPost
before. Any help will be extremely appreciated thanks!