Hi,
Do you mean that your php code does not work or that there is a malfunction in
Geoserver? For helping us to evaluate the latter you could help us a lot by
making a plain curl command that is supposed to work through the rest api by
using some of the demo layers like topp:states as a target.
-Jukka Rahkonen-
chathura911 wrote:
> 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
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users