From d2c445f5d7cf21606c9878bff3e4046c283944df Mon Sep 17 00:00:00 2001 From: snowdrop Date: Sun, 19 Sep 2004 07:05:01 +0000 Subject: Added http stream feature (only input stream yet) Added DIME "client" support (very experimental) --- examples/nanohttp/httpget.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'examples/nanohttp/httpget.c') diff --git a/examples/nanohttp/httpget.c b/examples/nanohttp/httpget.c index 319ff7f..e70469d 100644 --- a/examples/nanohttp/httpget.c +++ b/examples/nanohttp/httpget.c @@ -1,5 +1,5 @@ /****************************************************************** -* $Id: httpget.c,v 1.3 2004/08/26 17:02:24 rans Exp $ +* $Id: httpget.c,v 1.4 2004/09/19 07:05:03 snowdrop Exp $ * * CSOAP Project: A http client/server library in C (example) * Copyright (C) 2003 Ferhat Ayaz @@ -23,19 +23,10 @@ ******************************************************************/ #include -#ifdef WIN32 -#include -#include -#else #include -#endif -#ifdef WIN32 -int _tmain(int argc, _TCHAR* argv[]) -#else int main(int argc, char *argv[]) -#endif { httpc_conn_t *conn; hresponse_t *res; @@ -47,6 +38,11 @@ int main(int argc, char *argv[]) } log_set_level(HLOG_VERBOSE); + if (httpc_init(argc, argv)) + { + log_error1("Can not init httpc"); + return 1; + } conn = httpc_new(); res = httpc_get(conn, argv[1]); @@ -75,4 +71,4 @@ int main(int argc, char *argv[]) httpc_free(conn); return 0; -} \ No newline at end of file +} -- cgit v1.1-32-gdbae