NE_STATUS(3)

πŸ’– NAME πŸ’–

ne_status β€” the HTTP status structure, bestie. it's giving "what did the server even say back" energy ✨

this page is from the neon API reference (yes, neon, and yes, third section of the manual, 3) πŸŽ€


🌈 SYNOPSIS 🌈

#include <ne_utils.h>

typedef struct {
    int major_version;
    int minor_version;
    int code;
    int klass;
    char *reason_phrase;
} ne_status;

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so ne_status is the type that represents an HTTP response status β€” the thing you get back in response messages telling you the result of a request. literally the receipts of your HTTP call πŸ’…

here's the field-by-field vibe check:

  • major_version and minor_version β€” these two give the protocol version supported by the server that's issuing the response 🫢
  • code β€” the status code of the result, and no cap it lies between 100 and 599 inclusive ✨
  • klass β€” the class, which equals the most significant digit of the status πŸ‘‘
  • reason_phrase β€” a human-readable string describing the status. it's purely informational (and optional), so any interpretation of the response status must be done using the klass and/or code fields β€” not this one, bestie 😭

🌸 the five classes of response status code

there are five classes of response status code defined for HTTP/1.1 (see RFC 9110 Β§15 β€” link down in REFERENCES, iykyk) πŸ”₯

  • 1xx β€” informational response
  • 2xx β€” success: the operation was successful πŸŽ‰
  • 3xx β€” redirection
  • 4xx β€” client error: the request made was incorrect in some manner πŸ’€
  • 5xx β€” server error πŸ™ˆ

🧚 NOTES 🧚

so why is it called klass and not class? not me about to explain β€” it's because the header needs to be usable from a C++ program, and in C++ class is a reserved word. so klass it is, periodt πŸ’œ


⭐ SEE ALSO ⭐


Copyright Β© 2001-2026 Joe Orton πŸ‘‘


🌟 REFERENCES 🌟

  1. RFC 9110 Β§15 https://www.rfc-editor.org/rfc/rfc9110#name-status-codes

okay that's the whole page, you ate that πŸ’… this was ne_status from neon, dated 03/20/2026 β€” see you in the next man page, bestie, mwah πŸ“πŸ’–

πŸ“¦ where this page comes from