logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

TSHttpTxnClientReqGet - TSHttpTxnClientReqGet API function

Description

       Get the client request. The txnp must be passed in and the values in bufp and offset are updated to refer
       to the client request in the transaction. A typical use case would look like

          int
          CB_Read_Req_Hdr_Hook(TSCont contp, TSEvent event, void* data) {
             auto txnp = reinterpret_cast<TSHttpTxn>(data);
             TSMBuffer creq_buff;
             TSMLoc creq_loc;
             if (TS_SUCCESS == TSHttpTxnClientReqGet(txnp, &creq_buff, &creq_loc)) {
                // use the client request
             } // else values in creq_buff, creq_loc are garbage.
             TSHttpTxnReenable(txnp);
             return 0;
          }

       The  values  placed in bufp and offset are stable for the transaction and need only be retrieved once per
       transaction. Note these values are valid only if this function returns TS_SUCCESS.

Name

       TSHttpTxnClientReqGet - TSHttpTxnClientReqGet API function

Synopsis

          #include <ts/ts.h>

       TSReturnCodeTSHttpTxnClientReqGet(TSHttpTxntxnp,TSMBuffer*bufp,TSMLoc*offset)

See Also