ne_status.3 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. '\" t
  2. .\" Title: ne_status
  3. .\" Author:
  4. .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
  5. .\" Date: 15 April 2025
  6. .\" Manual: neon API reference
  7. .\" Source: neon 0.34.2
  8. .\" Language: English
  9. .\"
  10. .TH "NE_STATUS" "3" "15 April 2025" "neon 0.34.2" "neon API reference"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. ne_status \- HTTP status structure
  32. .SH "SYNOPSIS"
  33. .sp
  34. .ft B
  35. .nf
  36. #include <ne_utils\&.h>
  37. typedef struct {
  38. int major_version;
  39. int minor_version;
  40. int code;
  41. int klass;
  42. char *reason_phrase;
  43. } ne_status;
  44. .fi
  45. .ft
  46. .SH "DESCRIPTION"
  47. .PP
  48. The
  49. \fBne_status\fR
  50. type represents an HTTP response status; used in response messages giving a result of request\&. The
  51. \fImajor_version\fR
  52. and
  53. \fIminor_version\fR
  54. fields give the protocol version supported by the server issuing the response\&. The
  55. \fIcode\fR
  56. field gives the status code of the result (lying between
  57. 100
  58. and
  59. 599
  60. inclusive), and the
  61. \fIklass\fR
  62. field gives the class, which is equal to the most significant digit of the status\&. The
  63. \fIreason_phrase\fR
  64. field gives a human\-readable string describing the status, which is purely informational (and optional) \- any interpretation of the response status must be done using the
  65. \fIklass\fR
  66. and/or
  67. \fIcode\fR
  68. fields\&.
  69. .PP
  70. There are five classes of response status code defined for HTTP/1\&.1 (see
  71. \m[blue]\fBRFC 9110 ẞ15\fR\m[]\&\s-2\u[1]\d\s+2):
  72. .PP
  73. 1xx
  74. .RS 4
  75. Informational response\&.
  76. .RE
  77. .PP
  78. 2xx
  79. .RS 4
  80. Success: the operation was successful
  81. .RE
  82. .PP
  83. 3xx
  84. .RS 4
  85. Redirection
  86. .RE
  87. .PP
  88. 4xx
  89. .RS 4
  90. Client error: the request made was incorrect in some manner\&.
  91. .RE
  92. .PP
  93. 5xx
  94. .RS 4
  95. Server error
  96. .RE
  97. .SH "NOTES"
  98. .PP
  99. The
  100. \fIklass\fR
  101. field is named
  102. \(lqklass\(rq
  103. not
  104. \(lqclass\(rq
  105. so that the header can be used from a C++ program, in which
  106. \(lqclass\(rq
  107. is a reserved word\&.
  108. .SH "SEE ALSO"
  109. .PP
  110. ne_get_status\&.
  111. .SH "COPYRIGHT"
  112. .br
  113. Copyright \(co 2001-2024 Joe Orton
  114. .br
  115. .SH "REFERENCES"
  116. .IP " 1." 4
  117. RFC 9110 ẞ15
  118. .RS 4
  119. \%https://www.rfc-editor.org/rfc/rfc9110#name-status-codes
  120. .RE