Add support for displaying level names and authors
[numtypysics.git] / Http.h
blobcd76cf3fb4e1379dff4cf08c4370c74dd445d012
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.
17 #include <stdio.h>
18 #include <string.h>
19 #include <string>
21 class Http
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 const char* otherargs=NULL );
29 // response
30 std::string errorMessage();
31 std::string getHeader( const char* name );
33 // internals...
34 FILE *m_file;
35 int m_size;
36 std::string m_err;
37 std::string m_npid;