I've just started with mbed. I'm working with HTTPServer from the NetServices library; I've written a couple of custom handlers and they work really well. Now I'd like to have an HTTPClient running inside one of my server's request handlers. The sequence of events is:
1. A server receives an HTTP request.
2. The server's handler uses an HTTPClient to do a GET from the internet.
3. The handler receives the response.
4. The response is used to build a page that the server returns as a result to the first request.
All is OK until the client does a GET. This returns a result HTTP_ERROR; from this point on, my HTTP server is jammed and won't respond until the mbed is restarted.
Is using a server and client at the same time unsupported? Or have I just got something wrong?
I've just started with mbed. I'm working with HTTPServer from the NetServices library; I've written a couple of custom handlers and they work really well. Now I'd like to have an HTTPClient running inside one of my server's request handlers. The sequence of events is:
1. A server receives an HTTP request. 2. The server's handler uses an HTTPClient to do a GET from the internet. 3. The handler receives the response. 4. The response is used to build a page that the server returns as a result to the first request.
All is OK until the client does a GET. This returns a result HTTP_ERROR; from this point on, my HTTP server is jammed and won't respond until the mbed is restarted.
Is using a server and client at the same time unsupported? Or have I just got something wrong?