Murata RF modules are designed to simplify wireless development and certification by minimizing the amount of RF expertise you need to wirelessly enable a wide range of applications.

Revision:
2:f8e393a81c25
Parent:
1:fd19bd683e90
Child:
3:90ea1b8b2621
--- a/MuRata.cpp	Wed Feb 04 18:10:30 2015 +0000
+++ b/MuRata.cpp	Wed Feb 04 20:37:40 2015 +0000
@@ -748,31 +748,29 @@
 
 HTTPResponse * MuRata::SNIC_SendHTTPRequest(HTTPContent * content, const bool isHTTPS, const bool chunked)
 {
-    SubCommandID _id = isHTTPS ? SNIC_HTTPS_REQ: SNIC_HTTP_REQ;
-
+    SubCommandID _id = (isHTTPS == true) ? SNIC_HTTPS_REQ: SNIC_HTTP_REQ;
 
     _payload.Rewind();
     _payload.SetSubCommandID(_id);
     _payload.SetFrameID(_payload.GetFrameID() + 1);
-    _payload.SetContent((char)(content->GetRemotePort() >> 8));
-    _payload.SetContent((char)content->GetRemotePort());
+    _payload.SetContent(content->GetRemotePort() >> 8);
+    _payload.SetContent(content->GetRemotePort());
     _payload.SetContent((char)content->GetMethod());
     _payload.SetContent(content->GetTimeout());
 
-    _payload.SetContent(content->GetRemoteHost()->c_str(), 0, content->GetRemoteHost()->length());
+    _payload.SetContent(content->GetRemoteHost(), 0, strlen(content->GetRemoteHost()));
     _payload.SetContent(0x00);
 
-    _payload.SetContent(content->GetURI()->c_str(), 0, content->GetURI()->length());
+    _payload.SetContent(content->GetURI(), 0, strlen(content->GetURI()));
     _payload.SetContent(0x00);
 
-    _payload.SetContent(content->GetContentType()->c_str(), 0, content->GetContentType()->length());
+    _payload.SetContent(content->GetContentType(), 0, strlen(content->GetContentType()));
     _payload.SetContent(0x00);
 
-    string * _others = new string();
-    content->GetOtherHeaders(_others);
-    _payload.SetContent(_others->c_str(), 0, _others->length());
+    string _others;
+    content->GetOtherHeaders(&_others);
+    _payload.SetContent(_others.c_str(), 0, _others.length());
     _payload.SetContent(0x00);
-    delete _others;
 
     if (content->GetMethod() == POST) {
         int length = content->GetContentLength();