summaryrefslogtreecommitdiffstats
path: root/src/uscxml/URL.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-08-13 11:48:26 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-08-13 11:48:26 (GMT)
commit02f52d15e7df2500c0c6e96660a43a985add16e8 (patch)
treed4ccfdd7d1070201f39a9589b35e02a39ec179c8 /src/uscxml/URL.cpp
parentc30b602cdb5ede809b960e35fc7e702b7f1f76e2 (diff)
downloaduscxml-02f52d15e7df2500c0c6e96660a43a985add16e8.zip
uscxml-02f52d15e7df2500c0c6e96660a43a985add16e8.tar.gz
uscxml-02f52d15e7df2500c0c6e96660a43a985add16e8.tar.bz2
Builds for Raspberry and
started VoiceXML HTTP integration
Diffstat (limited to 'src/uscxml/URL.cpp')
-rw-r--r--src/uscxml/URL.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/uscxml/URL.cpp b/src/uscxml/URL.cpp
index 4e97faa..f5ba85c 100644
--- a/src/uscxml/URL.cpp
+++ b/src/uscxml/URL.cpp
@@ -341,6 +341,7 @@ void URLImpl::setRequestType(const std::string& requestType) {
void URLImpl::setOutContent(const std::string& content) {
_outContent = content;
+ _requestType = "POST";
}
const std::string URLImpl::getInContent(bool forceReload) {
@@ -602,15 +603,17 @@ void URLFetcher::fetchURL(URL& url) {
struct curl_slist* headers = NULL;
std::map<std::string, std::string>::iterator paramIter = url._impl->_outHeader.begin();
while(paramIter != url._impl->_outHeader.end()) {
- char* key = curl_easy_escape(handle, paramIter->first.c_str(), paramIter->first.length());
- char* value = curl_easy_escape(handle, paramIter->second.c_str(), paramIter->second.length());
+// char* key = curl_easy_escape(handle, paramIter->first.c_str(), paramIter->first.length());
+// char* value = curl_easy_escape(handle, paramIter->second.c_str(), paramIter->second.length());
+
+ const char* value = paramIter->second.c_str();
char* header = (char*)malloc(paramIter->first.size() + strlen(value) + 3);
sprintf(header,"%s: %s", paramIter->first.c_str(), value);
headers = curl_slist_append(headers, header);
- curl_free(key);
- curl_free(value);
+// curl_free(key);
+// curl_free(value);
paramIter++;
}