C and C++ web framework. http://rapida.vilor.one/docs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 lines
856 B

/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright 2022 Ivan Polyakov */
/*!
* \file query.h
* \brief Query string processing.
*/
#ifndef RAPIDA_QUERY_H_ENTRY
#define RAPIDA_QUERY_H_ENTRY
#include "keyval.h"
#ifdef __cplusplus
extern "C" {
#endif
/*!
* \brief Parses a query string.
*
* Parses a query string like `param=val&param1=val1` into an rpd_query struct.
*
* \param dest The rpd_keyval instance to write the parsed query.
* \param query The source query string to parse.
*
* \return Status code. A non-zero value is an error.
*/
int rpd_query_parse(rpd_keyval *dest, const char *query);
/*!
* \brief Creates query string from query instance.
*
* \param query Query instance.
*
* \return Query string.
*/
char *rpd_query_str(const rpd_keyval *query);
#ifdef __cplusplus
}
#endif
#endif /* RAPIDA_QUERY_H_ENTRY */