diff options
author | David Robillard <d@drobilla.net> | 2009-05-29 01:46:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-29 01:46:22 +0000 |
commit | 5245a25bafec9372d07c346457d473cfa76724df (patch) | |
tree | 1336a5bff4fbdd4179268df63dd486407e7a14cd /src/client | |
parent | 92a48b741ca3eb8698e6ae8f4f6923583d42cd66 (diff) | |
download | ingen-5245a25bafec9372d07c346457d473cfa76724df.tar.gz ingen-5245a25bafec9372d07c346457d473cfa76724df.tar.bz2 ingen-5245a25bafec9372d07c346457d473cfa76724df.zip |
DELETE via HTTP.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2047 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/HTTPEngineSender.cpp | 8 |
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); } |