net: http: add numeric http status code to response struct
Add numeric http status code to the response struct to allow for easier processing by the caller. Textual status already exists. Signed-off-by: Justin Morton <justin.morton@nordicsemi.no>
This commit is contained in:
parent
4289e46ae7
commit
35f598ba93
2 changed files with 7 additions and 0 deletions
|
@ -176,6 +176,8 @@ static int on_status(struct http_parser *parser, const char *at, size_t length)
|
|||
if (req->internal.response.http_cb &&
|
||||
req->internal.response.http_cb->on_status) {
|
||||
req->internal.response.http_cb->on_status(parser, at, length);
|
||||
req->internal.response.http_status_code =
|
||||
(uint16_t)parser->status_code;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue