Skip to content

API for encoding and decode URL-encoded form data #49

@michaelrsweet

Description

@michaelrsweet

Add an API for encoding and decoding application/x-www-form-urlencoded form data. Proposed API:

// Decode URL-encoded form data, returning the number of variables and a pointer to a
// `cups_option_t` array of the variables. Use `cupsFreeOptions` to return memory.
extern size_t cupsFormDecode(const char *data, cups_option_t **vars) _CUPS_PUBLIC;

// Encode options as URL-encoded form data, returning an allocated string. Use `free`
// to return memory.
extern char *cupsFormEncode(size_t num_vars, cups_option_t *vars) _CUPS_PUBLIC;

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions