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: C027 C12832 EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed
Diff: HTTPTransport.cpp
- Revision:
- 20:4d7321f7579d
- Parent:
- 19:956b694f6542
- Child:
- 21:d1ce325d1d32
--- a/HTTPTransport.cpp Thu Feb 27 07:47:20 2014 +0000
+++ b/HTTPTransport.cpp Thu Feb 27 15:20:30 2014 +0000
@@ -79,6 +79,7 @@
bool HTTPTransport::httpPut(char *url,char *data,int data_length,char *result,int result_length) {
HTTPText output(data,data_length);
HTTPText input(result,result_length);
+ this->m_http->basicAuth(IOC_USERNAME,IOC_PASSWORD);
int status = this->m_http->put(url,output,&input);
this->logger()->log("httpPut: Status: %d",status);
return (status == 0);
@@ -88,6 +89,7 @@
bool HTTPTransport::httpPost(char *url,char *data,int data_length,char *result,int result_length) {
HTTPText output(data,data_length);
HTTPText input(result,result_length);
+ this->m_http->basicAuth(IOC_USERNAME,IOC_PASSWORD);
int status = this->m_http->post(url,output,&input);
this->logger()->log("httpPost: Status: %d",status);
return (status == 0);