1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: curl_url_strerror 5Section: 3 6Source: libcurl 7See-also: 8 - curl_easy_strerror (3) 9 - curl_multi_strerror (3) 10 - curl_share_strerror (3) 11 - curl_url_get (3) 12 - curl_url_set (3) 13 - libcurl-errors (3) 14Protocol: 15 - All 16Added-in: 7.80.0 17--- 18 19# NAME 20 21curl_url_strerror - return string describing error code 22 23# SYNOPSIS 24 25~~~c 26#include <curl/curl.h> 27 28const char *curl_url_strerror(CURLUcode errornum); 29~~~ 30 31# DESCRIPTION 32 33This function returns a string describing the CURLUcode error code passed in 34the argument *errornum*. 35 36# %PROTOCOLS% 37 38# EXAMPLE 39 40~~~c 41int main(void) 42{ 43 CURLUcode rc; 44 CURLU *url = curl_url(); 45 rc = curl_url_set(url, CURLUPART_URL, "https://example.com", 0); 46 if(rc) 47 printf("URL error: %s\n", curl_url_strerror(rc)); 48 curl_url_cleanup(url); 49} 50~~~ 51 52# %AVAILABILITY% 53 54# RETURN VALUE 55 56A pointer to a null-terminated string. 57