Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

URLFetchServiceFactory? Asynchronous http request??  RSS feed

 
sin kang
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I need to implement a class like the one available in the com.google.appengine.api.urlfetch.URLFetchServiceFactory package.

I also need to implement a class to make asynchronous http request.

I was trying to get some ideas how to implement and all by searching the source code of those classes. Somehow, I coud not find ones.

Can you guys help me out on this? say How I should implement?? or any ideas?? or sample codes I can look up into??

Thanks guys.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

I'd think this would be rather simple: you'd just implement a synchronous fetch from a URL, but do it in a separate thread. Your API could provide a callback method so that when the fetch is complete, the callback could be notified.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!