ua_conn_easy_perform - quickly perform a transfer#

ORCAcode ua_conn_easy_perform(struct ua_conn *conn)#

Perform a blocking transfer.

Parameters:
  • conn – the connection handle

Returns:

ORCAcode for how the operation went, ORCA_OK means nothing out of the ordinary

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 };
struct ua_conn *conn = ua_conn_start(ua);
ua_conn_setup(conn, &conn_attr);

ua_conn_easy_perform(conn);

ua_conn_stop(conn);
ua_cleanup(ua);