Subversion Repositories Kolibri OS

Rev

Rev 7925 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include <kos/console.h>
  2. #include <kos/http.h>
  3. #include <kos/inputbox.h>
  4.  
  5. int main() {
  6.     con_write_asciiz("Wait, I'll ask you... when I'll done to fetch one site...\n");
  7.     con_set_title("Dynamicaly linked app");
  8.     http_msg *h = get("http://example.com", 0, HTTP_FLAG_BLOCK, "");
  9.     if (!receive(h)) {
  10.         con_printf("%s\n", h->content_ptr);
  11.     } else {
  12.         con_write_asciiz("Oops! Can't access to the page.\n");
  13.     }
  14.     char buffer[256];
  15.     InputBox(buffer, "Hay!", "How do you do?", "Hmm?", 0, 256, 0);
  16.     con_printf("Your answer is \"%s\"\n", buffer);
  17.     con_write_string("It's surprising, isn't it?", 26);
  18.     con_exit(0);
  19.     return 0;
  20. }
  21.