Geoserver rest api change layer style using PHP curl is not working 

I have tried using this code and nothing happed.

Please can any one help on this.

Thank you in advance. 

           curl_setopt($this->ch, CURLOPT_POST, True);
        $passwordStr = "admindd:geoservdder";
        curl_setopt($this->ch, CURLOPT_USERPWD, $passwordStr);
                
curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // -X
curl_setopt($this->ch, CURLOPT_HTTPHEADER, ['Content-Type: text/xml']); //
-H

$post =
array("<layer><defaultStyle><name>polygon</name></defaultStyle></layer>");
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $post); 

buffer = curl_exec($this->ch);



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Issue-with-geoserver-layer-style-change-using-PHP-curl-tp5156790.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to