ua_set_url - set User-Agent base URL

void ua_set_url(struct user_agent *ua, const char base_url[])

Set the request url.

Parameters
  • ua – the User-Agent handle created with ua_init()

  • base_url – the base request url

Example

struct user_agent *ua = ua_init(NULL);
ua_set_url(ua, "https://www.example.com");

struct ua_conn_attr conn_attr = { .method = HTTP_GET };

ua_easy_run(ua, NULL, NULL, &conn_attr);

ua_cleanup(ua);