summaryrefslogtreecommitdiffstats
path: root/examples/nanohttp
diff options
context:
space:
mode:
authorGravatar snowdrop2004-01-06 08:04:32 +0000
committerGravatar snowdrop2004-01-06 08:04:32 +0000
commit4b9b0651813509714a0fd3f6f60c31a5d2119d52 (patch)
treeb9c12523db1599bfdb07035c7f04e6d0d76b8df3 /examples/nanohttp
parent4366cd5474c6e7e8948a7fd86c799a2259f1bf55 (diff)
downloadcsoap-4b9b0651813509714a0fd3f6f60c31a5d2119d52.tar.gz
csoap-4b9b0651813509714a0fd3f6f60c31a5d2119d52.tar.bz2
changed scanf to gets
Diffstat (limited to 'examples/nanohttp')
-rw-r--r--examples/nanohttp/httppost.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/nanohttp/httppost.c b/examples/nanohttp/httppost.c
index 5640760..fe7fdb8 100644
--- a/examples/nanohttp/httppost.c
+++ b/examples/nanohttp/httppost.c
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: httppost.c,v 1.1 2004/01/05 12:24:44 snowdrop Exp $
+ * $Id: httppost.c,v 1.2 2004/01/06 08:04:32 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C (example)
* Copyright (C) 2003 Ferhat Ayaz
@@ -43,9 +43,12 @@ int main(int argc, char *argv[])
log_set_level(HLOG_VERBOSE);
printf("\nEnter post data (max 1054): ");
- scanf("%s", postdata);
+ gets(postdata);
printf("\nSending data to '%s'. Please wait ...\n ", argv[1]);
+ log_debug2("you entered: '%s'", postdata);
+ log_debug2("content-length: %d", strlen(postdata));
+
conn = httpc_new();
res = httpc_post(conn, argv[1], strlen(postdata), postdata);
@@ -60,7 +63,6 @@ int main(int argc, char *argv[])
log_debug3("%s: %s", pair->key, pair->value);
pair = pair->next;
}
-
puts(res->body);
}
else