summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/HTTPEngineSender.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/HTTPEngineSender.cpp b/src/client/HTTPEngineSender.cpp
index fa3509f6..abf51a56 100644
--- a/src/client/HTTPEngineSender.cpp
+++ b/src/client/HTTPEngineSender.cpp
@@ -130,7 +130,7 @@ HTTPEngineSender::put(const URI& uri,
AtomRDF::atom_to_node(_world, i->second));
const string str = model.serialise_to_string();
- SoupMessage* msg = soup_message_new("PUT", full_uri.c_str());
+ SoupMessage* msg = soup_message_new(SOUP_METHOD_PUT, full_uri.c_str());
assert(msg);
soup_message_set_request(msg, "application/x-turtle", SOUP_MEMORY_COPY, str.c_str(), str.length());
soup_session_send_message(_session, msg);
@@ -145,8 +145,12 @@ HTTPEngineSender::move(const Path& old_path,
void
-HTTPEngineSender::del(const Path& path)
+HTTPEngineSender::del(const Path& uri)
{
+ const string path = (uri.substr(0, 6) == "path:/") ? uri.substr(6) : uri.str();
+ const string full_uri = _engine_url.str() + "/" + path;
+ SoupMessage* msg = soup_message_new(SOUP_METHOD_DELETE, full_uri.c_str());
+ soup_session_send_message(_session, msg);
}