---
name: "TSHttpTxnClientStreamPriorityGet"
section: "3ts"
platform: "linux"
package: "trafficserver-dev"
version: "9.2.5+ds-0+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/TSHttpTxnClientStreamPriorityGet"
---

# TSHttpTxnClientStreamPriorityGet(3ts)

TSHttpTxnClientStreamPriorityGet API function

## NAME

TSHttpTxnClientStreamPriorityGet - TSHttpTxnClientStreamPriorityGet API function

## SYNOPSIS

```
#include <ts/ts.h>
```

- ***TSReturnCode* TSHttpTxnClientStreamPriorityGet(*TSHttpTxn* txnp, *TSHttpPriority* \*priority)**

  ## DESCRIPTION

Retrieve the priority information for the HTTP stream associated with the provided transaction.  The resultant priority information is populated in the **priority** output variable. The **TSHttpPriority** type is designed to be agnostic of the various HTTP protocol versions that support HTTP streams. The user should pass a pointer casted to **TSHttpPriority** from a previously allocated **TSHttp2Priority** structure. This design anticipates future support for HTTP versions that support streams, such as HTTP/3.

The **TSHttp2Priority** structure has the following declaration:

```
typedef struct {
  uint8_t priority_type; /** HTTP_PROTOCOL_TYPE_HTTP_2 */
  int32_t stream_dependency;
  uint8_t weight;
} TSHttp2Priority;
```

In a call to **TSHttpTxnClientStreamPriorityGet**, the dependency and weight will be populated in the **stream\_dependency** and **weight** members, respectively.  If the stream associated with the given transaction has no dependency, then the **stream\_dependency** output parameter will be populated with **-1** and the value of **weight** will be meaningless. See *RFC 7540* section 5.3 for details concerning HTTP/2 stream priority.

This API returns an error if the provided transaction is not an HTTP/2 transaction.

## SEE ALSO

*TSHttpTxnClientStreamIdGet*

## COPYRIGHT

2026, dev@trafficserver.apache.org
