English 中文(简体)
• 如何迫使库沙夫返回第64基地的附属物品,而不是“多部分”/相关的“多部分”?
原标题:How to force CouchDB to return attachments in base64 instead of MIME multipart/related?

http://wiki.apache.org/couchdb/HTTP_Document_API#Getting_Attachments_With_a_Document 。 我可以要求将附件连同文件附录通过<代码>?attachments=true。

www.un.org/Depts/DGACM/index_spanish.htm 问题

正如科文银行所言,在平原JSON或多部分/相关地区,可以归还附属物。

To get MIME multipart/related response format, just add an "Accept:" header to the request with value "multipart/related".

对我来说,他们总是以多部分或相关方式返回,即使没有接受:指定负责人。 Maybe web browser补充说,但我可以删除,而且需要plain JSON。 (用javascript处理)

www.un.org/Depts/DGACM/index_spanish.htm 问题

我应当做些什么来获得附带利益——或者——这是否是一种银团?

最佳回答

否则,网络浏览器套

Accept: */*

因此,正确的办法是事先重新确定接受方的负责人:

$.ajax({
beforeSend: function(req) {
    req.setRequestHeader("Accept", "");
    req.setRequestHeader("Accept", "application/json");
},
type: "GET",
url: "/db/doc/?attachments=true&rnd=_"+(new Date().getTime()),
contentType: "application/json; charset=utf-8",
success: function(data) {
    $("#test").html(JSON.stringify(data));
},
error:function(xx,s,x){alert("e"+x.message+" "+x+" "+s);},
});
问题回答

暂无回答




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签