val fetchOptions =FetchOptions.Builder.doNotFollowRedirects()
val instanceHostname =getInstanceHostname("default", "1", "$serverNum")
val u = URL("http://$instanceHostname/ping")
val req = HTTPRequest(u, HTTPMethod.GET, fetchOptions)
val timer = Stopwatch.createStarted()
val fetch = urlFetchService.fetch(req)
val rc = fetch.responseCode
timer.stop()
and then this in the /ping servlet
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter writer = response.getWriter();
writer.println("Hello there from the backend");
writer.flush();
}
--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/2vx4_sdC8v0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengine+unsubscribe@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/b0335619-c20c-4938-9994-76549c75f009%40googlegroups.com.