我有一个cUrl请求:
SELECT u.id AS userId,
u.type AS userType
FROM User AS u
INNER JOIN Personal AS p
ON u.id = p.userId
WHERE p.realName LIKE '%adf%'
AND u.type = 1
UNION
SELECT u.id AS userId,
u.type AS userType
FROM User AS u
INNER JOIN Company AS c
ON u.id=c.userId
WHERE c.name LIKE '%grge%'
LIMIT 0 , 10000
我需要像上面那样提出请求,但是使用C#
我的代码示例:
curl -v -u admin:geoserver -XPUT -H "Content-type: application/zip" --data-binary @C:\nyc_khr.zip http://localhost:9090/geoserver/rest/workspaces/nyc_roads/datastores/roads/file.shp
答案 0 :(得分:1)
而不是
request.AddFile()
这对我有用:
request.Parameters.Clear();
request.AddParameter("application/zip", data, ParameterType.RequestBody);