curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: a URL API ?

From: Daniel Jeliński via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 9 Aug 2018 11:37:29 +0200

2018-08-09 10:48 GMT+02:00 Daniel Stenberg via curl-library
<curl-library_at_cool.haxx.se>:
> Say we want to append this to the query:
>
> char *append = "&thistoo=44";

Well assuming we want to use the API to build URL based on HTML form
with GET action, curl_url_query_append suggested by Geoff would be
much nicer. In particular, I would expect the API to:
- figure out if it needs to add & or ?
- figure out if it needs to URLEncode the parameter or value (eg. when
setting "company"="AT&T", we need to escape the ampersand)
- do the appending / memory allocation part on its own
What do you think?
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-08-09