Sending response asynchronously for an HTTP POST Request

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanddune007
    New Member
    • Aug 2014
    • 1

    Sending response asynchronously for an HTTP POST Request

    I am using embedded web server mongoose.My embedded device runs the web server mongoose and is the server.


    I am trying to achieve the following
    Questions:
    ------------
    1. Can response to an client HTTP POST request be sent at later part of the executions?
    example
    -------
    Client(requests )------>Server------->Does some processing ------->Server sends multiple responses at different point of execution.


    2. Can the Server send responses for the request asynchronously at different point.


    How I achieve this ?
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    1. that depends on what you consider a response. generally for HTTP, you can only send one Response (the response may be chunked, but still only one as a whole) per Request. However, if you used WebSockets you could send anything anytime because you’re not bound to the HTTP.

    2. see 1.

    Comment

    Working...