Reputation: 11340
I'm currently working with a number of third parties, sending them data via an HttpPost with an encrypted url string. Each of the third parties sends back an xml string which I then read and use. All is good!
The question I have is this. If I send a request to a third party, and they do not provide a response, what happens? To clarify, I mean that a response string isn't returned in all cases - not just errors and timeouts.
Upvotes: 0
Views: 74
Reputation: 22280
Few things can happen:
String.Empty
output.Upvotes: 2
Reputation: 171188
The HTTP protocol does not include a way to not send a response. A response is always sent. It might be zero length, though.
I mean that a response string isn't returned in all cases
Is this a question or an assertion? This statement is false.
and they do not provide a response, what happens?
So what happens in case of a zero-length response? That depends entirely on your code. Neither protocol not framework care about this case.
Couldn't the socket actually be closed before any headers are sent back? Or, if the server is down?
That's a protocol violation. That's not HTTP, then. In such a situation the app is generally notified through an exception.
Upvotes: 1