.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "TSHTTPTXNSERVERREQGET" "3ts" "Apr 16, 2024" "9.2" "Apache Traffic Server" .SH NAME TSHttpTxnServerReqGet \- TSHttpTxnServerReqGet API function .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX #include .EE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fI\%TSReturnCode\fP TSHttpTxnServerReqGet(\fI\%TSHttpTxn\fP txnp, \fI\%TSMBuffer\fP *bufp, \fI\%TSMLoc\fP *obj) .UNINDENT .SH DESCRIPTION .sp Get the request Traffic Server is sending to the upstream (server) for the transaction \fItxnp\fP\&. \fIbufp\fP and \fIobj\fP should be valid pointers to use as return values. The call site could look something like .INDENT 0.0 .INDENT 3.5 .sp .EX TSMBuffer mbuffer; TSMLoc mloc; if (TS_SUCCESS == TSHttpTxnServerReqGet(&mbuffer, &mloc)) { /* Can use safely mbuffer, mloc for subsequent API calls */ } else { /* mbuffer, mloc in an undefined state */ } .EE .UNINDENT .UNINDENT .sp This call returns \fI\%TS_SUCCESS\fP on success, and \fI\%TS_ERROR\fP on failure. It is the caller\(aqs responsibility to see that \fItxnp\fP is a valid transaction. .sp Once the request object is obtained, it can be used to access all of the elements of the request, such as the URL, the header fields, etc. This is also the mechanism by which a plugin can change the upstream request, if done before the request is sent (in or before \fI\%TS_HTTP_SEND_REQUEST_HDR_HOOK\fP). Note that for earlier hooks, the request may not yet exist, in which case an error is returned. .SH COPYRIGHT 2024, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .