English 中文(简体)
CouchDB URL rewrite:我能否在改写过程中确定申请机构?
原标题:CouchDB URL rewrite: can I define a request body in the rewrite?

我愿创建一部精彩的手工艺器,大体添加如下内容:

"from": "/createSomeStuff",
"to": "../../_bulk_docs",
"method": "POST"

this works fine ... but id also like the build the request body in the rewrite rules. Much akin to the way the query is built in this example I found on URL rewriting:

"rewrites": [
    {
      "from": "/blog",
      "to": "_list/posts/all",
      "query": {
        "descending":true,
        "limit": 5
      }
    }
  ],

这样做有办法:

"from": "/createSomeStuff",
"to": "../../_bulk_docs",
"method": "POST",
"request" : {
              "body":{{"foo": true},{"bar" : false}}
 }
最佳回答

我知道,这是不可能的。 然而,你可能试图确定一些违约值。 可以用另一种方式做到这一点。 你们必须创造更新的手稿,并用手工艺。 E.g. 我有以下rew:

  { "from": "createSomeStuff",
    "to" : "../your_design_doc/_update/in-place",
    "method": "POST"
  }

在你的设计中,你添加了如下文所述的内容:CouchDb auto timestamps

问题回答

暂无回答




相关问题
URL rewrite in IIS6 - Third party tools

I have collected the following api/sdk/whatever which provide modules for doing url rewriting in IIS 5/6/7. Some are free-open source and some require $. I haven t tried any of them. I would like to ...

Rewrite spring-security redirect URLs

I m trying to get Tuckey UrlRewriteFilter to tidy up URLs for my webapp. One problem I ve got is that when spring-security notices that an anonymous user is trying to access a protected resource it ...

ASP.NET Friendly URLs

In my research, I found 2 ways to do them. Both required modifications to the Application_BeginRequest procedure in the Global.Asax, where you would run your code to do the actual URL mapping (mine ...

Could I get by HttpModule the URL that contains * before?

My web-site is working under ASP.NET 3.5, IIS7, Integrated pipiline mode. My HttpModule is getting request to all resources, including URLs like this: http://my-site.com/address And I would support *...

Domains & Foreward Slash

This is rather difficult to explain so please bear with me. We will be hosting 4 websites on our server and the plan is to have each site sit under its own domain: site-a.com site-b.com sub1.site-b....

URL Mod-Rewrite

I currently have a working URL: http://example.com/security-services.php?service=fixed-camera-surveillance and then I have PHP say, $_REQUEST[ service ] to do some stuff... But I d like to ...

热门标签