1--- 2c: Copyright (C) Daniel Stenberg, <daniel.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) 14--- 15 16# NAME 17 18curl_url_strerror - return string describing error code 19 20# SYNOPSIS 21 22~~~c 23#include <curl/curl.h> 24 25const char *curl_url_strerror(CURLUcode errornum); 26~~~ 27 28# DESCRIPTION 29 30This function returns a string describing the CURLUcode error code passed in 31the argument *errornum*. 32 33# EXAMPLE 34 35~~~c 36int main(void) 37{ 38 CURLUcode rc; 39 CURLU *url = curl_url(); 40 rc = curl_url_set(url, CURLUPART_URL, "https://example.com", 0); 41 if(rc) 42 printf("URL error: %s\n", curl_url_strerror(rc)); 43 curl_url_cleanup(url); 44} 45~~~ 46 47# AVAILABILITY 48 49Added in 7.80.0 50 51# RETURN VALUE 52 53A pointer to a null-terminated string. 54