ne_get_content_type — retrieve content type of response
#include <ne_basic.h>
typedef struct {
const char *type, *subtype;
const char *charset;
char *value;
} ne_content_type;int ne_get_content_type(ne_request *req, ne_content_type *ctype);The ne_get_content_type function retrieves
and parses the Content-Type header from the response
to request req. If successful, all fields of
the ctype structure are set (and are never
NULL). The value field must be freed by
the caller using free after use.
ne_get_content_type returns zero if the
response had a valid Content-Type header, or
non-zero on error. On error, the ctype
structure is not altered.
A default charset value was
returned for text/xml content-types in neon
0.36.0 and earlier; later versions use no default (per RFC
7303).