HTTPRequestStates.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. namespace Best.HTTP
  3. {
  4. /// <summary>
  5. /// Possible logical states of a HTTTPRequest object.
  6. /// </summary>
  7. public enum HTTPRequestStates : int
  8. {
  9. /// <summary>
  10. /// Initial status of a request. No callback will be called with this status.
  11. /// </summary>
  12. Initial,
  13. /// <summary>
  14. /// The request queued for processing.
  15. /// </summary>
  16. Queued,
  17. /// <summary>
  18. /// Processing of the request started. In this state the client will send the request, and parse the response. No callback will be called with this status.
  19. /// </summary>
  20. Processing,
  21. /// <summary>
  22. /// The request finished without problem. Parsing the response done, the result can be used. The user defined callback will be called with a valid response object. The request’s Exception property will be null.
  23. /// </summary>
  24. Finished,
  25. /// <summary>
  26. /// The request finished with an unexpected error. The user defined callback will be called with a null response object. The request's Exception property may contain more info about the error, but it can be null.
  27. /// </summary>
  28. Error,
  29. /// <summary>
  30. /// The request aborted by the client(HTTPRequest’s Abort() function). The user defined callback will be called with a null response. The request’s Exception property will be null.
  31. /// </summary>
  32. Aborted,
  33. /// <summary>
  34. /// Connecting to the server timed out. The user defined callback will be called with a null response. The request’s Exception property will be null.
  35. /// </summary>
  36. ConnectionTimedOut,
  37. /// <summary>
  38. /// The request didn't finished in the given time. The user defined callback will be called with a null response. The request’s Exception property will be null.
  39. /// </summary>
  40. TimedOut
  41. }
  42. }