Fork HTTPClient and Modfiy code for mbed 6.0
Dependents: mbed-demo-http-get-json
Diff: data/HTTPFile.h
- Revision:
- 33:d4d1475bafc0
- Parent:
- 32:7b9919d59194
--- a/data/HTTPFile.h Sat Oct 11 17:26:04 2014 +0000 +++ b/data/HTTPFile.h Sun Feb 01 16:50:39 2015 +0000 @@ -1,13 +1,25 @@ #ifndef HTTPFILE_H #define HTTPFILE_H -#if 1 #include <mbed.h> #include "../IHTTPData.h" +/// A file handling mechanism - downloads files to a locally accessible file system class HTTPFile : public IHTTPDataIn { public: + /// Instantiate HTTPFile with a specified file on a locally accessible file system. + /// + /// @code + /// HTTPFile latest("/local/status.txt"); + /// HTTPErrorCode = http.get("http://server.dom/path/serverstatus.txt", &latest); + /// if (HTTPErrorCode == HTTP_OK) { + /// ... // file successfully downloaded + /// } + /// @endcode + /// + /// @param filename is the fully qualified filename to create. + /// HTTPFile(char* filename); /** Closes the file, should be called once the http connection is closed. @@ -51,5 +63,4 @@ size_t m_len; bool m_chunked; }; -#endif #endif // HTTPFILE_H \ No newline at end of file