使用Postman发送xml Post请求(Geoserver)

使用Postman发送xml Post请求(Geoserver),第1张

在 Geoserver 中,发送请求有两种方式,一种是实现get发送请求,另一种是使用post发送xml文件进行请求。

比如下面的例子

获取元数据

使用Get请求

使用Post请求

该请求需要按照图设置即可发送请求

现在sql2005可以直接接受xml数据,只要你逻辑层,把表示层数据构造好xml文件,直接提交到相应的xml字段就可以

using System

using System.Collections.Generic

using System.IO

using System.Text

using System.Net

using System.Web

namespace Deerchao.Utility

{

public class HttpClient

{

#region fields

private bool keepContext

private string defaultLanguage = "zh-CN"

private Encoding defaultEncoding = Encoding.UTF8

private string accept = "*/*"

private string userAgent = "Mozilla/4.0 (compatibleMSIE 6.0Windows NT 5.2SV1.NET CLR 1.1.4322.NET CLR 2.0.50727)"

private HttpVerb verb = HttpVerb.GET

private HttpClientContext context

private readonly List<HttpUploadingFile>files = new List<HttpUploadingFile>()

private readonly Dictionary<string, string>postingData = new Dictionary<string, string>()

private string url

private WebHeaderCollection responseHeaders

private int startPoint

private int endPoint

#endregion


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/7994380.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-12
下一篇 2023-04-12

发表评论

登录后才能评论

评论列表(0条)

保存