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: mbed EthernetNetIf
TinyHTTP.h
00001 /* 00002 * mbed Tiny HTTP Client 00003 * Copyright (c) 2011 Hiroshi Suga 00004 * Released under the MIT License: http://mbed.org/license/mit 00005 */ 00006 00007 /** @file 00008 * @brief Tiny HTTP Client 00009 */ 00010 00011 #ifndef TinyHTTP_h 00012 #define TinyHTTP_h 00013 00014 #define DEBUG 00015 00016 #define HTTP_PORT 80 00017 #define HTTP_TIMEOUT 15000 // ms 00018 00019 #define METHOD_GET 0 00020 #define METHOD_POST 1 00021 00022 /** send http request 00023 * @param method METHOD_GET or METHOD_POST 00024 * @param host http server 00025 * @param uri URI 00026 * @param head http header (CR+LF) (or NULL) 00027 * @param body POST body (or NULL) 00028 * @return http code, -1:failue 00029 */ 00030 int httpRequest (int method, Host *host, char *uri, char *head, char *body); 00031 00032 void createauth (char *user, char *pwd, char *buf, int len); 00033 00034 int base64enc(const char *input, unsigned int length, char *output, int len); 00035 00036 int urlencode(char *str, char *buf, int len); 00037 00038 #endif
Generated on Mon Jul 18 2022 14:48:01 by
1.7.2