Hello,
I'm trying to DELETE a store using php-curl.
This is my HTTP comunication log...
* About to connect() to localhost port 8080 (#0)
* Trying ::1... * connected
* Connected to localhost (::1) port 8080 (#0)
* Server auth using Basic with user 'admin'
> DELETE /geoserver/rest/workspaces/Alentejo/datastores/teste HTTP/1.1
Authorization: Basic YWRtaW46YWRtaW4=
Host: localhost:8080
Accept: */*
Content-type: application/atom+xml
Content-Length: 23
> < HTTP/1.1 403 Forbidden
< Server: Apache-Coyote/1.1
< Content-Type: text/plain
< Transfer-Encoding: chunked
< Date: Thu, 29 Sep 2011 21:55:13 GMT
<
* Connection #0 to host localhost left intact
# Unsuccessful cURL request to
> http://localhost:8080/geoserver/rest/workspaces/Alentejo/datastores/teste[403]
datastore not empty
* Closing connection #0
I'm trying to send the recurse parameter like this:
//Required DELETE request settings
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
//DELETE data
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-type:
> application/atom+xml"));
// Send recurse parameter
$xmlStr = "<recurse>true</recurse>";
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlStr);
I'm using Geoserver 2.1.1, PHP 5.3.2 and cURL extension 7.19.7
After looking at Geoserver GUI, the store continues there and it should be
gone.
A tip: I can successfully add stores using this method (PHP-cURL).
Thank you for your attention :)
Marco Afonso
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users