1.. Licensed to the Apache Software Foundation (ASF) under one or more
2   contributor license agreements.  See the NOTICE file distributed
3   with this work for additional information regarding copyright
4   ownership.  The ASF licenses this file to you under the Apache
5   License, Version 2.0 (the "License"); you may not use this file
6   except in compliance with the License.  You may obtain a copy of
7   the License at
8
9   http://www.apache.org/licenses/LICENSE-2.0
10
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14   implied.  See the License for the specific language governing
15   permissions and limitations under the License.
16
17.. include:: ../../../common.defs
18
19.. default-domain:: c
20
21TSHttpHdrStatusGet
22******************
23
24Synopsis
25========
26
27.. code-block:: cpp
28
29    #include <ts/ts.h>
30
31.. function:: TSHttpStatus TSHttpHdrStatusGet(TSMBuffer bufp, TSMLoc offset)
32
33Description
34===========
35
36Retrieve the status code value from the HTTP response header identified by :arg:`bufp` and
37:arg:`offset`. The value should be an enumeration value of :c:type:`TSHttpStatus`, although because
38plugins can call :c:func:`TSHttpHdrStatusSet` this may not be true. If the header is not a valid
39response then :c:macro:`TS_HTTP_STATUS_NONE` is returned.
40
41See Also
42========
43
44:c:func:`TSHttpTxnClientRespGet`, :c:func:`TSHttpTxnServerRespGet`, :c:func:`TSHttpHdrTypeGet`.
45