#restrequest
Adding style in GeoServer with restsharp
I can add a new style application/zip with Postman into GeoServer, but I can't do it with C#-RestSharp. How can I do this? string url = "http://" + server + "/geoserver/rest/styles?name="+ StyleName; var client = new RestClient(url); var request = new RestRequest(Method.POST); string authInfo = username + ":" + password; request.AddHeader("authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo))); request.AddHeader("cache-control", "no-cache"); request.AddHeader("content-type", "application/zip"); request.AddHeader("authorization", "Basic YWRtaW46Z2Vvc2VydmVy"); FileStream uploadFileStream = System.IO.File.OpenRead(@"D:\aa.zip"); request.AddParameter("application /zip", uploadFileStream, ParameterType.RequestBody); IRestResponse response = client.Execute(request); --- string url = "http://..../geoserver/rest/styles?name=" + StyleName; wsn = "mystyle"; WebRequest request = WebRequest.Create(url); request.ContentType = "application/vnd.ogc.sld+xml"; request.Method = "POST"; string authInfo = username + ":" + password; request.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo)); request.Credentials = new NetworkCredential(username, password); byte[] buffer = Encoding.GetEncoding("UTF-8").GetBytes(wsn); Stream reqstr = request.GetRequestStream(); reqstr.Write(buffer, 0, buffer.Length); reqstr.Close();
gis.stackexchange.com
September 4, 2026 at 4:11 PM
I need ideas! I'm not great at resting so, a radical idea that forces me to do it (without illness or injury) would be of interest. Who is doing something innovative? Tell me!

#helpafriend #restrequest #travel #newideas
August 10, 2026 at 1:43 PM
Might we request a parliamentary ceasefire, please? Nothing matters much to us, the victims, but being heard and saved. Thank you for listening for this long, if you have been, Giants of The Isles. #juststorytelling #respect #peace #love #freedom #change #restrequest
May 25, 2025 at 8:13 AM
Adding style in GeoServer with restsharp
I can add a new style application/zip with Postman into GeoServer, but I can't do it with C#-RestSharp. How can I do this? string url = "http://" + server + "/geoserver/rest/styles?name="+ StyleName; var client = new RestClient(url); var request = new RestRequest(Method.POST); string authInfo = username + ":" + password; request.AddHeader("authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo))); request.AddHeader("cache-control", "no-cache"); request.AddHeader("content-type", "application/zip"); request.AddHeader("authorization", "Basic YWRtaW46Z2Vvc2VydmVy"); FileStream uploadFileStream = System.IO.File.OpenRead(@"D:\aa.zip"); request.AddParameter("application /zip", uploadFileStream, ParameterType.RequestBody); IRestResponse response = client.Execute(request); --- string url = "http://..../geoserver/rest/styles?name=" + StyleName; wsn = "mystyle"; WebRequest request = WebRequest.Create(url); request.ContentType = "application/vnd.ogc.sld+xml"; request.Method = "POST"; string authInfo = username + ":" + password; request.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo)); request.Credentials = new NetworkCredential(username, password); byte[] buffer = Encoding.GetEncoding("UTF-8").GetBytes(wsn); Stream reqstr = request.GetRequestStream(); reqstr.Write(buffer, 0, buffer.Length); reqstr.Close();
gis.stackexchange.com
May 7, 2026 at 10:05 AM
Adding style in GeoServer with restsharp
I can add a new style application/zip with Postman into GeoServer, but I can't do it with C#-RestSharp. How can I do this? string url = "http://" + server + "/geoserver/rest/styles?name="+ StyleName; var client = new RestClient(url); var request = new RestRequest(Method.POST); string authInfo = username + ":" + password; request.AddHeader("authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo))); request.AddHeader("cache-control", "no-cache"); request.AddHeader("content-type", "application/zip"); request.AddHeader("authorization", "Basic YWRtaW46Z2Vvc2VydmVy"); FileStream uploadFileStream = System.IO.File.OpenRead(@"D:\aa.zip"); request.AddParameter("application /zip", uploadFileStream, ParameterType.RequestBody); IRestResponse response = client.Execute(request); --- string url = "http://..../geoserver/rest/styles?name=" + StyleName; wsn = "mystyle"; WebRequest request = WebRequest.Create(url); request.ContentType = "application/vnd.ogc.sld+xml"; request.Method = "POST"; string authInfo = username + ":" + password; request.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo)); request.Credentials = new NetworkCredential(username, password); byte[] buffer = Encoding.GetEncoding("UTF-8").GetBytes(wsn); Stream reqstr = request.GetRequestStream(); reqstr.Write(buffer, 0, buffer.Length); reqstr.Close();
gis.stackexchange.com
December 23, 2025 at 9:07 AM
Adding style in GeoServer with restsharp
I can add a new style application/zip with Postman into GeoServer, but I can't do it with C#-RestSharp. How can I do this? string url = "http://" + server + "/geoserver/rest/styles?name="+ StyleName; var client = new RestClient(url); var request = new RestRequest(Method.POST); string authInfo = username + ":" + password; request.AddHeader("authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo))); request.AddHeader("cache-control", "no-cache"); request.AddHeader("content-type", "application/zip"); request.AddHeader("authorization", "Basic YWRtaW46Z2Vvc2VydmVy"); FileStream uploadFileStream = System.IO.File.OpenRead(@"D:\aa.zip"); request.AddParameter("application /zip", uploadFileStream, ParameterType.RequestBody); IRestResponse response = client.Execute(request); --- string url = "http://..../geoserver/rest/styles?name=" + StyleName; wsn = "mystyle"; WebRequest request = WebRequest.Create(url); request.ContentType = "application/vnd.ogc.sld+xml"; request.Method = "POST"; string authInfo = username + ":" + password; request.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo)); request.Credentials = new NetworkCredential(username, password); byte[] buffer = Encoding.GetEncoding("UTF-8").GetBytes(wsn); Stream reqstr = request.GetRequestStream(); reqstr.Write(buffer, 0, buffer.Length); reqstr.Close();
gis.stackexchange.com
August 20, 2025 at 4:04 AM
Adding style in GeoServer with restsharp
I can add a new style application/zip with Postman into GeoServer, but I can't do it with C#-RestSharp. How can I do this? string url = "http://" + server + "/geoserver/rest/styles?name="+ StyleName; var client = new RestClient(url); var request = new RestRequest(Method.POST); string authInfo = username + ":" + password; request.AddHeader("authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo))); request.AddHeader("cache-control", "no-cache"); request.AddHeader("content-type", "application/zip"); request.AddHeader("authorization", "Basic YWRtaW46Z2Vvc2VydmVy"); FileStream uploadFileStream = System.IO.File.OpenRead(@"D:\aa.zip"); request.AddParameter("application /zip", uploadFileStream, ParameterType.RequestBody); IRestResponse response = client.Execute(request); --- string url = "http://..../geoserver/rest/styles?name=" + StyleName; wsn = "mystyle"; WebRequest request = WebRequest.Create(url); request.ContentType = "application/vnd.ogc.sld+xml"; request.Method = "POST"; string authInfo = username + ":" + password; request.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo)); request.Credentials = new NetworkCredential(username, password); byte[] buffer = Encoding.GetEncoding("UTF-8").GetBytes(wsn); Stream reqstr = request.GetRequestStream(); reqstr.Write(buffer, 0, buffer.Length); reqstr.Close();
gis.stackexchange.com
April 17, 2025 at 7:10 PM