.\" Man page generated from reStructuredText. . .TH "TSURLCREATE" "3ts" "January 24, 2017" "7.0" "Apache Traffic Server" .SH NAME TSUrlCreate \- traffic Server URL object construction API . .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 .. .SH SYNOPSIS .sp \fI#include \fP .INDENT 0.0 .TP .B TSReturnCode TSUrlCreate(TSMBuffer\fI\ bufp\fP, TSMLoc *\fI\ locp\fP) .UNINDENT .INDENT 0.0 .TP .B TSReturnCode TSUrlClone(TSMBuffer\fI\ dest_bufp\fP, TSMBuffer\fI\ src_bufp\fP, TSMLoc\fI\ src_url\fP, TSMLoc *\fI\ locp\fP) .UNINDENT .INDENT 0.0 .TP .B TSReturnCode TSUrlCopy(TSMBuffer\fI\ dest_bufp\fP, TSMLoc\fI\ dest_url\fP, TSMBuffer\fI\ src_bufp\fP, TSMLoc\fI\ src_url\fP) .UNINDENT .INDENT 0.0 .TP .B TSParseResult TSUrlParse(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, const char **\fI\ start\fP, const char *\fI\ end\fP) .UNINDENT .SH DESCRIPTION .sp The URL data structure is a parsed version of a standard internet URL. The Traffic Server URL API provides access to URL data stored in marshal buffers. The URL functions can create, copy, retrieve or delete entire URLs, and retrieve or modify parts of URLs, such as their host, port or scheme information. .sp \fI\%TSUrlCreate()\fP creates a new URL within the marshal buffer \fIbufp\fP\&. Release the resulting handle with a call to \fBTSHandleMLocRelease()\fP\&. .sp \fI\%TSUrlClone()\fP copies the contents of the URL at location \fIsrc_url\fP within the marshal buffer \fIsrc_bufp\fP to a location within the marshal buffer \fIdest_bufp\fP\&. Release the returned handle with a call to \fBTSHandleMLocRelease()\fP\&. .sp \fI\%TSUrlCopy()\fP copies the contents of the URL at location \fIsrc_url\fP within the marshal buffer \fIsrc_bufp\fP to the location \fIdest_url\fP within the marshal buffer dest_bufp. \fI\%TSUrlCopy()\fP works correctly even if \fIsrc_bufp\fP and \fIdest_bufp\fP point to different marshal buffers. It is important for the destination URL (its marshal buffer and \fBTSMLoc\fP) to have been created before copying into it. .sp \fI\%TSUrlParse()\fP parses a URL. The \fIstart\fP pointer is both an input and an output parameter and marks the start of the URL to be parsed. After a successful parse, the \fIstart\fP pointer equals the \fIend\fP pointer. The \fIend\fP pointer must be one byte after the last character you want to parse. The URL parsing routine assumes that everything between \fIstart\fP and \fIend\fP is part of the URL. It is up to higher level parsing routines, such as \fBTSHttpHdrParseReq()\fP, to determine the actual end of the URL. .SH RETURN VALUES .sp The \fI\%TSUrlParse()\fP function returns a \fBTSParseResult\fP, where \fBTS_PARSE_ERROR\fP indicates an error. Success is indicated by one of \fBTS_PARSE_DONE\fP or \fBTS_PARSE_CONT\fP\&. The other APIs all return a \fBTSReturnCode\fP, indicating success (\fBTS_SUCCESS\fP) or failure (\fBTS_ERROR\fP) of the operation. .SH SEE ALSO .sp \fITSAPI(3ts)\fP, \fITSMBufferCreate(3ts)\fP, \fITSUrlHostGet(3ts)\fP, \fITSUrlHostSet(3ts)\fP, \fITSUrlStringGet(3ts)\fP, \fITSUrlPercentEncode(3ts)\fP .SH COPYRIGHT 2015, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .