Salesforce Case Generator for mbed

Revision:
2:670837d3e248
Parent:
1:5c876ee72cf0
Child:
3:8ad19b204ddf
--- a/SalesForceCaseGenerator.cpp	Wed Aug 27 05:39:58 2014 +0000
+++ b/SalesForceCaseGenerator.cpp	Wed Aug 27 16:52:58 2014 +0000
@@ -40,14 +40,16 @@
      memset(result,0,BUFFER_LENGTH+1);
      
      // create the case
-     sprintf(data,"{ \"subject\":\"%s\", \"description\":\"%s\" }", subject, description);
-     
+     sprintf(data,"{\"subject\":\"%s\",\"description\":\"%s\"}", subject, description);
+          
      // Create the inbound and outbound buffers
      HTTPText http_data(data,strlen(data)+1);
      HTTPText http_result(result,BUFFER_LENGTH);
-     
+          
      // POST the case and check the response
+     this->m_logger->log("Sending Request...\r\nlength=%d bytes",strlen(data));
      if (this->m_http.post(DF_CASE_GEN_URL,http_data,&http_result) == 0) {
+        this->m_logger->log("Parsing Reply...");
         success = this->contains(result,"status","ok");
         if (success) 
             this->m_logger->log("Case generated successfully");