1 /*
2  * This file is part of NumptyPhysics
3  * Copyright (C) 2008 Tim Edmonds
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 3 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  */
16 
17 #include <stdio.h>
18 #include <string.h>
19 #include <string>
20 
21 class Http
22 {
23 public:
24   // start
25   bool get( const char* uri, const char* file );
26   bool post( const char* uri, const char*putname, const char* putfile );
27 
28   // response
29   std::string errorMessage();
30   std::string getHeader( const char* name );
31 
32   // internals...
33   FILE *m_file;
34   int   m_size;
35   std::string m_err;
36   std::string m_npid;
37 
38 };
39 
40 
41