首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用ajax请求发布with服务的IODOCS配置

使用ajax请求发布with服务的IODOCS配置
EN

Stack Overflow用户
提问于 2014-06-05 03:13:01
回答 1查看 183关注 0票数 0

我想把下面的JSON字符串作为I/O DOC中请求正文的一部分。

{“名称”:“ABCD”,“别名”:“PS”,“日期”:“20140604”,“状态”:“新建”,"PdfPath":"/folder1/app.pdf"}

端点的配置是什么?我正在使用下面的端点配置,但它不起作用。

代码语言:javascript
复制
{
  "endpoints": [
  {
    "name": "Information",
    "methods": [
      {
        "MethodName":"Add Product",
        "Synopsis": "Used to add Product for TEST purpose. This service is called internally, hence this helppage serves as a mockup for the internal call",
        "HTTPMethod":"POST",
        "URI":"/ServiceHost/test.svc/add-testService",
        "RequiresOAuth":"N",
        "parameters":[

          {
            "Name":"Name",
            "Default":"A",
            "Type":"enumerated",
            "EnumeratedList": ["A","B","C"],
            "DefaultValue":"N/A",
            "IsMandatory":"Yes",

            "Description":"This refers to the name."
          },

          {
            "Name":"Alias",

            "Default":"AB",

            "Type":"string",
            "DefaultValue":"N/A",
            "IsMandatory":"Yes",

            "Description":"This refers to the code."
          },

          {
            "Name":"Date",

            "Default":"",

            "Type":"string",
            "DefaultValue":"N/A",
            "IsMandatory":"Yes",

            "Description":"This refers to the date."
          },
          {
            "Name":"Status",
            "Default":"",

            "Type":"string",

            "DefaultValue":"New",
            "IsMandatory":"No",

            "Description":"This refers to the status."
          },

          {
            "Name":"PdfPath",
            "Default":"",

            "Type":"string",
            "DefaultValue":"Empty String",
            "IsMandatory":"No",

            "Description":"This refers to the full pdf path."
          }
        ]

      }
    ]
  }
]
}
EN

回答 1

Stack Overflow用户

发布于 2014-07-02 22:21:26

您需要使用Type作为textarea。更具体地说,您可以使用content-type参数指定要发布的输入的类型。

代码语言:javascript
复制
    "contentType": "application/xml",
    "type": "textarea",

我想这会解决你的问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24045689

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档