.\" Man page generated from reStructuredText. . .TH "TSURLPERCENTENCODE" "3ts" "January 24, 2017" "7.0" "Apache Traffic Server" .SH NAME TSUrlPercentEncode \- traffic Server URL percent encoding 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 TSUrlPercentEncode(TSMBuffer\fI\ bufp\fP, TSMLoc\fI\ offset\fP, char *\fI\ dst\fP, size_t\fI\ dst_size\fP, size_t *\fI\ length\fP, const unsigned char *\fI\ map\fP) .UNINDENT .INDENT 0.0 .TP .B TSReturnCode TSStringPercentEncode(const char *\fI\ str\fP, int\fI\ str_len\fP, char *\fI\ dst\fP, size_t\fI\ dst_size\fP, size_t *\fI\ length\fP, const unsigned char *\fI\ map\fP) .UNINDENT .INDENT 0.0 .TP .B TSReturnCode TSStringPercentDecode(const char *\fI\ str\fP, size_t\fI\ str_len\fP, char *\fI\ dst\fP, size_t\fI\ dst_size\fP, size_t *\fI\ length\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\%TSUrlPercentEncode()\fP performs percent\-encoding of the URL object, storing the new string in the \fIdst\fP buffer. The \fIlength\fP parameter will be set to the new (encoded) string length, or \fB0\fP if the encoding failed. \fI\%TSStringPercentEncode()\fP is similar but operates on a string. If the optional \fImap\fP parameter is provided (not \fBNULL\fP) , it should be a map of characters to encode. .sp \fI\%TSStringPercentDecode()\fP perform percent\-decoding of the string in the \fIstr\fP buffer, writing to the \fIdst\fP buffer. The source and destination can be the same, in which case they overwrite. The decoded string is always guaranteed to be no longer than the source string. .SH RETURN VALUES .sp All these APIs returns a \fBTSReturnCode\fP, indicating success (\fBTS_SUCCESS\fP) or failure (\fBTS_ERROR\fP) of the operation. .SH SEE ALSO .sp \fITSAPI(3ts)\fP, \fITSUrlCreate(3ts)\fP, \fITSUrlHostGet(3ts)\fP, \fITSUrlHostSet(3ts)\fP, \fITSUrlStringGet(3ts)\fP .SH COPYRIGHT 2015, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .