.\" 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 "TSHTTPTXNSERVERRESPGET" "3ts" "Jan 06, 2024" "9.2" "Apache Traffic Server" .SH NAME TSHttpTxnServerRespGet \- TSHttpTxnServerRespGet API function .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX #include .EE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fI\%TSReturnCode\fP TSHttpTxnServerRespGet(\fI\%TSHttpTxn\fP txnp, \fI\%TSMBuffer\fP *bufp, \fI\%TSMLoc\fP *offset) .UNINDENT .SH DESCRIPTION .sp Get the response header sent by the upstream server. This will only be useful in a callback on a hook that is called after the upstream responds, and if there was an upstream response. For instance, if the inbound request has no remap rule and \fI\%remap is required\fP then there will be no server response because no outbound connection was made. In this case the function will return \fI\%TS_ERROR\fP\&. .sp The response header is returned in \fIbufp\fP and \fIoffset\fP\&. \fIbufp\fP is the heap in which the header resides, and \fIoffset\fP is the location in that heap. These will be used in subsequent calls to retrieve information from the header. .INDENT 0.0 .INDENT 3.5 .sp .EX int get_response_status(TSHttpTxn txn) { TSMBuffer resp_heap = nullptr; TSMLoc resp_hdr = nullptr; if (TS_SUCCESS == TSHttpTxnServerRespGet(tnx, &resp_heap, &resp_hdr)) { return TSHttpHdrStatusGet(resp_headp, resp_hdr); } return HTTP_STATUS_NONE; } .EE .UNINDENT .UNINDENT .SH COPYRIGHT 2024, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .