1/* 2 Copyright (c) 2013-2014 Arduino LLC. All right reserved. 3 4 This library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 2.1 of the License, or (at your option) any later version. 8 9 This library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with this library; if not, write to the Free Software 16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17*/ 18 19#ifndef HTTPCLIENT_H_ 20#define HTTPCLIENT_H_ 21 22#include <Process.h> 23 24class HttpClient :public Process { 25public: 26HttpClient(); 27 28unsigned intget(String &url); 29unsigned intget(const char* url); 30voidgetAsynchronously(String &url); 31voidgetAsynchronously(const char* url); 32unsigned intpost(String &url, String &data); 33unsigned intpost(const char* url,const char* data); 34voidpostAsynchronously(String &url, String &data); 35voidpostAsynchronously(const char* url,const char* data); 36unsigned intpatch(String &url, String &data); 37unsigned intpatch(const char* url,const char* data); 38voidpatchAsynchronously(String &url, String &data); 39voidpatchAsynchronously(const char* url,const char* data); 40unsigned intput(String &url, String &data); 41unsigned intput(const char* url,const char* data); 42voidputAsynchronously(String &url, String &data); 43voidputAsynchronously(const char* url,const char* data); 44voidsetHeader(String &header); 45voidsetHeader(const char* header); 46 boolean ready(); 47unsigned intgetResult(); 48voidnoCheckSSL(); 49voidcheckSSL(); 50 51private: 52 boolean insecure; 53 54private: 55voidaddHeader(); 56 String header; 57}; 58 59#endif/* HTTPCLIENT_H_ */