X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuclient.git;a=blobdiff_plain;f=uclient.h;h=65e48b2f35b68058f3fb2f7ec4ff009ded60a9d5;hp=60b021e9993c02dbd49cdd341f80d43d10ac8d0f;hb=8fbe2716f550b1feddccdc4e8de3d391d414f5df;hpb=4a3a8cb176aa932ed4bc88354fad76d91764c65f diff --git a/uclient.h b/uclient.h index 60b021e..65e48b2 100644 --- a/uclient.h +++ b/uclient.h @@ -58,13 +58,8 @@ struct uclient_cb { struct uclient *uclient_new(const char *url, const char *auth_str, const struct uclient_cb *cb); void uclient_free(struct uclient *cl); -int uclient_connect_url(struct uclient *cl, const char *url_str); - -static inline int uclient_connect(struct uclient *cl) -{ - return uclient_connect_url(cl, NULL); -} - +int uclient_set_url(struct uclient *cl, const char *url, const char *auth); +int uclient_connect(struct uclient *cl); int uclient_read(struct uclient *cl, char *buf, int len); int uclient_write(struct uclient *cl, char *buf, int len); @@ -73,8 +68,8 @@ int uclient_request(struct uclient *cl); /* HTTP */ extern const struct uclient_backend uclient_backend_http; +int uclient_http_reset_headers(struct uclient *cl); int uclient_http_set_header(struct uclient *cl, const char *name, const char *value); -int uclient_http_reset_headers(struct uclient *cl, const char *name, const char *value); int uclient_http_set_request_type(struct uclient *cl, const char *type); bool uclient_http_redirect(struct uclient *cl);