gpt4 book ai didi

c# - 在 REST 中传递参数?我可以只传递字符串还是允许 xml?

转载 作者:太空宇宙 更新时间:2023-11-03 11:45:56 25 4
gpt4 key购买 nike

我有一个包含近 50++ 个字段的客户表。我只是在想如果我通过 XML 格式的文本传递它们是否可行,因为它们有很多参数

示例如下:

[操作合约][WebInvoke(UriTemplate = "new/customerxml/", Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat= WebMessageFormat.Xml)]public XmlElement NewCustomer(XmlElement 值)

我是否以这种方式传递 XmlElement?

最佳答案

是的,您可以在调用 REST 网络服务时发送 XML,但您必须使用 POST 方法而不是 GET。

关于c# - 在 REST 中传递参数?我可以只传递字符串还是允许 xml?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3455927/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com