source: arduino-1-6-7/trunk/fuentes/arduino-ide-amd64/libraries/Bridge/src/HttpClient.h @ 46

Last change on this file since 46 was 46, checked in by jrpelegrina, 4 years ago

First release to Xenial

File size: 2.0 KB
Line 
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 {
25  public:
26    HttpClient();
27
28    unsigned int get(String &url);
29    unsigned int get(const char * url);
30    void getAsynchronously(String &url);
31    void getAsynchronously(const char * url);
32    unsigned int post(String &url, String &data);
33    unsigned int post(const char * url, const char * data);
34    void postAsynchronously(String &url, String &data);
35    void postAsynchronously(const char * url, const char * data);
36    unsigned int patch(String &url, String &data);
37    unsigned int patch(const char * url, const char * data);
38    void patchAsynchronously(String &url, String &data);
39    void patchAsynchronously(const char * url, const char * data);
40    unsigned int put(String &url, String &data);
41    unsigned int put(const char * url, const char * data);
42    void putAsynchronously(String &url, String &data);
43    void putAsynchronously(const char * url, const char * data);
44    void setHeader(String &header);
45    void setHeader(const char * header);
46    boolean ready();
47    unsigned int getResult();
48    void noCheckSSL();
49    void checkSSL();
50
51  private:
52    boolean insecure;
53
54  private:
55    void addHeader();
56    String header;
57};
58
59#endif /* HTTPCLIENT_H_ */
Note: See TracBrowser for help on using the repository browser.