Ulfius
HTTP Framework for REST Applications in C
include
yuarel.h
Go to the documentation of this file.
1
22
#ifndef INC_YUAREL_H
23
#define INC_YUAREL_H
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
37
struct
yuarel
{
38
char
*
scheme
;
/* scheme, without ":" and "//" */
39
char
*
username
;
/* username, default: NULL */
40
char
*
password
;
/* password, default: NULL */
41
char
*
host
;
/* hostname or IP address */
42
int
port
;
/* port, default: 0 */
43
char
*
path
;
/* path, without leading "/", default: NULL */
44
char
*
query
;
/* query, default: NULL */
45
char
*
fragment
;
/* fragment, default: NULL */
46
};
47
48
/* A struct to hold the query string parameter values. */
49
struct
yuarel_param
{
50
char
*
key
;
51
char
*
val
;
52
};
53
72
extern
int
yuarel_parse
(
struct
yuarel
*url,
char
*url_str);
73
87
extern
int
yuarel_split_path
(
char
*path,
char
**parts,
int
max_parts);
88
108
extern
int
yuarel_parse_query
(
char
*query,
char
delimiter,
struct
yuarel_param
*params,
int
max_params);
109
110
#ifdef __cplusplus
111
}
112
#endif
113
114
#endif
/* INC_YUAREL_H */
yuarel_param
Definition:
yuarel.h:49
yuarel_param::key
char * key
Definition:
yuarel.h:50
yuarel_param::val
char * val
Definition:
yuarel.h:51
yuarel
Definition:
yuarel.h:37
yuarel::host
char * host
Definition:
yuarel.h:41
yuarel::password
char * password
Definition:
yuarel.h:40
yuarel::query
char * query
Definition:
yuarel.h:44
yuarel::fragment
char * fragment
Definition:
yuarel.h:45
yuarel::port
int port
Definition:
yuarel.h:42
yuarel::username
char * username
Definition:
yuarel.h:39
yuarel::scheme
char * scheme
Definition:
yuarel.h:38
yuarel::path
char * path
Definition:
yuarel.h:43
yuarel_parse
int yuarel_parse(struct yuarel *url, char *url_str)
Definition:
yuarel.c:139
yuarel_split_path
int yuarel_split_path(char *path, char **parts, int max_parts)
Definition:
yuarel.c:236
yuarel_parse_query
int yuarel_parse_query(char *query, char delimiter, struct yuarel_param *params, int max_params)
Definition:
yuarel.c:266
Generated by
1.9.1