Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetNetIf mbed
TinyHTTP.h
- Committer:
- okini3939
- Date:
- 2011-07-27
- Revision:
- 0:f2bf5f966801
- Child:
- 2:764ecec3dc59
File content as of revision 0:f2bf5f966801:
/*
* mbed Tiny HTTP Client
* Copyright (c) 2011 Hiroshi Suga
* Released under the MIT License: http://mbed.org/license/mit
*/
/** @file
* @brief Tiny HTTP Client
*/
#ifndef TinyHTTP_h
#define TinyHTTP_h
#define DEBUG
#define HTTP_PORT 80
#define HTTP_TIMEOUT 15000 // ms
#define METHOD_GET 0
#define METHOD_POST 1
/** send http request
* @param method METHOD_GET or METHOD_POST
* @param host http server
* @param uri URI
* @param head http header (CR+LF) (or NULL)
* @param body POST body (or NULL)
* @return http code, -1:failue
*/
int httpRequest (int method, Host *host, char *uri, char *head, char *body);
#endif