avoid sending duplicate headers
[project/uclient.git] / uclient.h
index 961f523..e8214c2 100644 (file)
--- a/uclient.h
+++ b/uclient.h
@@ -55,16 +55,11 @@ struct uclient_cb {
        void (*error)(struct uclient *cl, int code);
 };
 
-struct uclient *uclient_new(const char *url, const struct uclient_cb *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);