--
You received this message because you are subscribed to the Google Groups "MochiWeb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mochiweb+u...@googlegroups.com.
To post to this group, send email to moch...@googlegroups.com.
Visit this group at http://groups.google.com/group/mochiweb.
For more options, visit https://groups.google.com/groups/opt_out.
=CRASH REPORT==== 19-Jun-2013::17:32:50 ===crasher:initial call: mochiweb_acceptor:init/3pid: <0.104.0>registered_name: []exception exit: {noproc,{gen_server,call,[httpc_manager,{request,{request,undefined,<0.104.0>,0,http,{"webservices.amazon.com",80},"/onca/xml","?get,{http_request_h,undefined,"keep-alive",undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,"webservices.amazon.com",undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,[],undefined,undefined,undefined,undefined,"0",undefined,undefined,undefined,undefined,undefined,undefined,[]},{[],[]},{http_options,"HTTP/1.1",infinity,true,{essl,[]},undefined,false,infinity,false},[],none,[],1371677570196,undefined,undefined,false}},infinity]}}in function gen_server:call/3 (gen_server.erl, line 188)in call from httpc:handle_request/9 (httpc.erl, line 584)in call from amazonproductapi:do_rest_call/4 (src/amazonproductapi.erl, line 65)in call from isbn_imageserver:handle_test/2 (src/isbn_imageserver.erl, line 86)in call from mochiweb_http:headers/5 (src/mochiweb_http.erl, line 101)ancestors: [mochiweb_http,isbn_imageserver_sup,<0.30.0>]
I think you've described the solution pretty well. Just use a HTTP client library to make the request to the external service and do whatever it is you need to do with the response. The fact that you're also using mochiweb is irrelevant.
On Tuesday, June 18, 2013, wrote:
I have a HTTP server using mochiweb and I would like it to do an HTTP request to an external web service, wait for the result, do something with it, and then return a HTTP response.How would you approach this situation in mochiweb?In my case I would like to leverage data from the Amazon Advertising API, using the amazonproductapi library ( https://github.com/arjan/amazonproductapi )--
You received this message because you are subscribed to the Google Groups "MochiWeb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mochiweb+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "MochiWeb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mochiweb+u...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "MochiWeb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mochiweb/c_dKJtX8gT0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mochiweb+u...@googlegroups.com.
To post to this group, send email to moch...@googlegroups.com.
Visit this group at http://groups.google.com/group/mochiweb.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to mochiweb+u...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "MochiWeb" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mochiweb/c_dKJtX8gT0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mochiweb+u...@googlegroups.com.
To post to this group, send email to moch...@googlegroups.com.
Visit this group at http://groups.google.com/group/mochiweb.
For more options, visit https://groups.google.com/groups/opt_out.