There is a code that creates new featureType at geoserver:
string par = @"/c D:curl-7.32.0-ssl-sspi-zlib-static-bin-w32curl.exe -v -u admin:MYPASSWORD -XPOST -H ""Content-type: text/xml"" -d ""<featureType><name>" + name + @"</name><title>" + MyHtmlEncode(title) + @"</title></featureType>"" http://localhost:8080/geoserver/rest/workspaces/cite/datastores/postgis/featuretypes";
Process P = Process.Start(@"C:WindowsSystem32cmd.exe",par);
I want to read output of server and handle errors, they said I should replace curl with HttpClient
, but I don't know how to describe authorization (-u admin:MYPASSWORD
).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…