[Geoserver-devel] Dojo calling Geoserver REST endpoint

Hi,

Tried calling the rest endpoint using DOJO to create a new style in Geoserver without any success. Tried both PUT and POST. Sample code below

Any ideas ?

var xhrArgs = {
url: “http://cp947sw:8080/geoserver/rest/styles/default_polygon.sld”,
postData: “”,
handleAs: “xml”,
headers: {“Content-Type”: “application/vnd.ogc.sld+xml; charset=UTF-8”},
load: function(data) {
alert(data);
},
error: function(error) {
alert(error);
}
}

//Call the asynchronous xhrPost
var deferred = dojo.xhrPost(xhrArgs);


Thanks and Warm Regards
Debasish Sahu

Debasish Sahu ha scritto:

Hi,

Tried calling the rest endpoint using DOJO to create a new style in Geoserver without any success. Tried both PUT and POST. Sample code below

Debasish, you should ask this question on the users list.

GS-devel is the right mailing list if you have something to contribute
to GeoServer (documentation, code), GS-users is the right list for
asking questions on how to use the software and other issues

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.