Last active
December 14, 2015 03:18
-
-
Save t-8ch/5019420 to your computer and use it in GitHub Desktop.
Revisions
-
t-8ch revised this gist
Feb 23, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ /* * file: test_libsoup_msg.c * compile with: * cc $(pkg-config --cflags --libs libsoup-2.4) test_libsoup_msg.c -o test_libsoup_msg */ #include <libsoup/soup.h> -
t-8ch created this gist
Feb 23, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ /* * file: test_libsoup_msg.c * compile with: * cc $(pkg-config --cflags --libs libsoup-2.4) * test_libsoup_msg.c -o test_libsoup_msg */ #include <libsoup/soup.h> #include <glib/gprintf.h> int main(int argc, char** argv) { SoupSession *session; SoupMessage *msg; if(argc != 2) { g_printerr("No URL given\n"); return 3; } g_type_init(); session = soup_session_sync_new(); msg = soup_message_new("GET", argv[1]); soup_session_send_message(session, msg); g_printf("Statuscode: %u\n" "Reason: %s\n", msg->status_code, msg->reason_phrase); return 0; }