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

ne_strparam - HTTP extended parameter value encoding

Description

       The ne_strparam function can be used to encode an extended parameter value for an HTTP header, as defined
       in RFC 5987. The function takes as arguments the value to encode, using a given MIME charset character
       set, and lang language tag. The extended parameter encoding is used in HTTP protocol specifications to
       allow easily embedding special characters (such as quote marks, separators or non-ASCII) in header
       values.

       In accordance with RFC 5987, the charset argument must be either "UTF-8" or "IS0-8859-1", but the lang
       argument may be NULL.

History

ne_strparam is available in neon 0.32.0 and later.

Name

       ne_strparam - HTTP extended parameter value encoding

Return Value

       The return value is either:

       NULL
           if the value parameter is a "regular parameter" and does not need extended encoding

       non-NULL
           the encoding of the input value as an extended parameter as a NUL-terminated, malloc-allocated string

See Also

https://tools.ietf.org/html/rfc5987

Synopsis

#include<ne_string.h>char*ne_strparam(constchar*charset,constchar*lang,constchar*value);

See Also