slashhttp500

http500  时间:2021-04-13  阅读:()
APPENDIXA251CouchDBAPIReferenceThisappendixisanoverviewoftheAPIcallsyoucanmaketotheCouchDBserver.
ServerAPIsServerInformationRequestMethod:GETRequestURI:/RequestHeaders:NoneRequestBody:EmptyRequestParameters:NoneDescription:ReturnsawelcomemessageandtheCouchDBversionnumberSampleRequestURI:http://127.
0.
0.
1:5984/Thefollowingisasampleresponse:{"couchdb":"Welcome","version":"0.
9.
1"}APPENDIXACOUCHDBAPIREFERENCE252CurrentConfigurationRequestMethod:GETRequestURI:/_configRequestHeaders:NoneRequestBody:EmptyRequestParameters:NoneDescription:ReturnsallofCouchDB'sconfigurationoptionsandtheircurrentvaluesSampleRequestURI:http://127.
0.
0.
1:5984/_configThefollowingisasampleresponse:{"httpd_design_handlers":{"_list":"{couch_httpd_show,handle_view_list_req}","_show":"{couch_httpd_show,handle_doc_show_req}","_view":"{couch_httpd_view,handle_view_req}"},"httpd_global_handlers"couch_httpd_misc_handlers,handle_welcome_req,GET/HTTP/1.
1>User-Agent:curl/7.
16.
3(powerpc-apple-darwin9.
0)libcurl/7.
16.
3OpenSSL/0.
9.
7lzlib/1.
2.
3>Host:127.
0.
0.
1:5984>Accept:*/*>1200OK9.
0(ErlangOTP/R13B)9.
0"}*Connection#0tohost127.
0.
0.
1leftintact*Closingconnection#0Bydefault,ifarequestmethodisnotsupplied,curlwillperformaGETrequest.
TomakeanHTTPrequestwithadifferentmethod,suchasPUT,youcanusethe-Xargument.
ThefollowingcommandmakesaPUTrequesttotheURI/mydb,whichwillcreateanewdatabasenamedmydb:curl-XPUThttp://127.
0.
0.
1:5984/mydbIfyouneedtospecifyheadersinyourHTTPrequest,youusethe-Hargument.
ThefollowingexampleusestheDestinationheadertodefinewhereadocumentshouldbecopiedto:curl-XCOPYhttp://127.
0.
0.
1:5984/mydb/doc1-H'Destination:doc2'ManyofCouchDB'sAPImethodsrequireyoutoincludedatainthemessagebody.
Youcansupplythisdatausingthe-dargument,asshowninthefollowingreplicationexample:curl-XPOSThttp://127.
0.
0.
1:5984/_replicate-d'{"source":"db_one","target":"db_two"}'Thepreviousexampleworksquitenicely,becausethedatabeingsuppliedintherequestbodyisshort.
Butwhatifyouneedtosupplyalargesetofdata,suchasanumberofdocumentsbeingaddedusingthebulkdocumentAPIInthiscase,youcansavethedatainafile,forexampledocuments.
json,andthentellcurltoloadthedatafromthisfile.
Thefollowingisanexampleofthistypeofrequest:curl-XPOSThttp://127.
0.
0.
1:5984/mydb/_bulk_docs-d@documents.
jsonAPPENDIXBHTTPANDCURLREFERENCE287curlhasahostofothercommand-linearguments,fartoomanytolisthere.
Afinalargumentthatyoumayfinduseful,however,isthe-oflag.
Youcanusethistooutputtheresponsetoafile,asfollows:curlhttp://127.
0.
0.
1:5984/mydb/mydoc-omydoc.
jsonThiswillstorethedocumentwithdocumentIDmydocinthefilemydoc.
json.
289IndexSymbols+(plus)icon(Futon),63/(slash)asrequestURI,251AACIDproperties,6adhocviews.
SeetemporaryviewsADC(Apple'sDeveloperConnection),32administrationtool.
SeeFutonadministrationtoolaggregatingresultsonviews,143–50_all_dbsresource,104,258_all_docsresource,57,229,267,268_all_docs_by_seqresource,58,269,270all-or-nothingbulkupdates,235Apple'sDeveloperConnection(ADC),32applicationdevelopment,185–209withCouchApp.
SeeCouchAppwithCouchdbkitlibrary(Python),185–91withCouchRestlibrary,191–200withDjangoextensions(Python),200–209apt-getpackagemanager,12arrays,JSON,89,90loopingthrough,96–102atomicity,6attachmentsdeleting,273uploadingwithFuton,76–78,272_attachmentssubdirectory(couchappsdirectory),172Bbackups,248bind_addressoption,81bookmarksapplication(example),200–209booleandatatype(JSON),89buildingCouchDBfromsourcecode,19–28Erlang,23ICU,25Libcurllibrary,24Spidermonkey,25Subversion,26_bulk_docsresource,232,275bulkfetchingofdocuments,229–32,275bulkwritingofdocuments,232–35Cclustering,250CompactDatabaselink(Futon),78–80_compactresource,261compactingdatabases,78–80,224–28,261complexkeys,157_configresource,252configurationinformation,retrieving,252configuringCouchDBinstallation,80,243–46conflictresolution,246–47_conflictsdocument,246consistency,6Content-Typeheader,272,277COPYrequests(HTTP),50,266,284copyingdocuments,266CouchApp,163–84buildingtaskmanager,169–84gettingstarted,165–69installing,163–65couchappsdirectory,creating,165CouchDB,about,3–5CouchDBadministrationtool.
SeeFutonadministrationtoolCouchDBAPI,7triggeringdatabasereplication,223viewsand,119–23map/reducewith,135–36CouchDBapplications,developing,185–209withCouchApp.
SeeCouchAppwithCouchdbkitlibrary(Python),185–91withCouchRestlibrary,191–200withDjangoextensions(Python),200–209CouchDBconfigurationoptions,80CouchDBConfigurationtool(Futon),80CouchDBdependencypackages,12Erlang,23INDEX290ICU,25libcurl,24Spidermoney,25Subversion,26updating(MacOSX),44CouchDBdeployment,241–50backup,248clustering,250configuration,243–46conflictresolution,246–47faulttoleranceandloadbalancing,249measuringperformance,241–43security,247–48CouchDBdocuments,about,6.
Seealsodocumentscouchdbfolder,27CouchDBinstallationonLinux,9–28buildingfromsourcecode,19–28Erlang,23ICU,25Libcurllibrary,24Spidermonkey,25Subversion,26configurationoptions,243–46FedoraLinux,14–19UbuntuLinux8.
10,12–15CouchDBinstallationonMacOSX,29–46configurationoptions,243–46MacPortspackagemanager,34–40usingCouchDBX,45–46Xcodedevelopertools,29–34couchdb-loungeframework,250couchdbservice,configuring,13couchdbuser,creating,13,27CouchDBviews.
SeeviewsCouchdbkitlibrary,185–91Djangoextensions,200–209installing,186CouchDBXpackage,45–46CouchRestlibrary,191–200CouchTasksapplication(example),169–84COUNTfunction(SQL),138countingwordswithmap/reduce(example),139–41CreateDatabaselink(Futon),63,65–70CreateDocumentlink(Futon),70–76curlutility,13,19,50accessingviews,120,135determiningdatabasesize,227enteringJSONdatathrough,56howtouse,51performingHTTPrequests,285–88D-doption,curlutility,51,54datarelationships,viewsand,154–58datatypesJSON,50,89limitingmapfunctionswith,126databasesaddingdocumentsto,54–57,262,263inbulk,232–35usingCouchdbkit(forPython),187usingCouchRest(forRuby),194allowingremoteconnectionsto,81APIsfor(list),256–61backups,248compacting,78–80,224–28,261conflictresolution,246–47creating,49,51–57,256withFuton,65–70inPython,186inRuby,193deleting,53,257deletingdocumentsfrom,55fetchingdocumentsinbulk,229–32,275listing,258replicating,83–85,211–24,260forbackup,248incrementalreplication,215triggeringreplicationfromapplications,223retrievinginformationon,259security,247–48sizeof,determining,227updatingdocumentsin,57,264inbulk,232–35views.
SeeviewsDELETErequests(HTTP),50,265,273,284_deletedmetafield(documents),234deletingattachments,273databases,53,257documents,55,265olddocumentrevisions.
Seecompactiondependencypackages,installing,12Erlang,23ICU,25libcurl,24Spidermonkey,25Subversion,26updating(MacOSX),44deployingCouchDB,241–50backup,248clustering,250configuration,243–46conflictresolution,246–47INDEX291faulttoleranceandloadbalancing,249measuringperformance,241–43security,247–48descendingargument(views),58,152designdocuments,116–18creating,276asJSONobjects,103languageandviewsfields,117permanentviewsin,121showfunctionsin,235–38,280_designresource,276,278,279,280,281,282Destinationheader,266developingCouchDBapplications,185–209withCouchApp.
SeeCouchAppwithCouchdbkitlibrary(Python),185–91withCouchRestlibrary,191–200withDjangoextensions(Python),200–209disk_sizevalue,227Djangoextensions,200–209documentrevisions,6deletingdocumentsand,55purgingold(compaction),224–28_revfield,103document-orienteddatabases,5documentsaddingtodatabases,54–57,262,263inbulk,232–35usingCouchdbkit(forPython),187usingCouchRest(forRuby),194APIsfor,listof,262–75attachingfilesto,76–78,272backupsof,248copying,266creatingwithFuton,70–76deleting,55,265designdocuments.
Seedesigndocumentsfetchinginbulk,229–32,275_idand_revfields,103bulkfetchingand,231bulkwritingand,234JSON,presentinginnon-JSONformats,235–38listing,267,268,269,270querying(returning).
Seeviewsupdating,57,264inbulk,232–35viewing,271.
Seealsoviewsducktyping,112durability,6Eeasy_installutility,165,185emitfunction,126endkeyargument(views),153Erlang,building,23executingviews.
SeeviewsFFabricformulalanguage,4faulttolerance,249FedoraLinux,installingCouchDBon,14–19fetchingdocumentsinbulk,229–32,275file_existserror,52files,attachingtodocuments,76–78,272filteringresults(views),151–54Futonadministrationtool,8,63–86compactingdatabases,78–80,224–28creatingdatabases,65–70creatingdocuments,70–76creatingviews,109–13.
Seealsoviewspermanentviews,113–16map/reducein,127–35replication.
Seereplicatingdatabasesshowfunctions,creating,235TestSuite,running,14,20,29,46databasescreatedby,53toolsof,80–85uploadingattachments,76–78GGETrequests(HTTP),50,284Google'smap/reducefunctionality,125groupingresultsonviews,143–50H-Hoption,curlutility,51historyofCouchDB,4HTTPrequests,283performingwithcurl,285–88HTTPresponses,50,284statuscodesfor,285IICU,building,25_idfield(documents),103fordesigndocuments,103fetchingdocumentsinbulk,231writingdocumentsinbulk,234incrementalreplication,215index.
htmlfile(couchappsdirectory),167installingCouchDBonLinux,9–28buildingfromsourcecode,19–28Erlang,23ICU,25Libcurllibrary,24INDEX292Spidermonkey,25Subversion,26configurationoptions,243–46FedoraLinux,14–19UbuntuLinux8.
10,12–15installingCouchDBonMacOSX,29–46configurationoptions,243–46MacPortspackagemanager,34–40usingCouchDBX,45–46Xcodedevelopertools,29–34isolation,6JJavaScriptObjectNotation.
SeeJSON,SeeJSONJavascriptviewengine,7,57JSON(JavaScriptObjectNotation),7,50,87–105about,87advantages,87CouchDBwith,103–4encapsulatingwithsinglequotes,54enteringdatathroughcurl,56loopingthrougharrays,96–102presentingdocumentsasnon-JSON,235–38roleinasynchronouswebapplications,98structures,defining,91–96syntaxanddatatypes,88–91KKatz,Damien,4keyargument(views),153Llanguagefield(designdocuments),103,117launchingCouchDBserver,13,18,28Libcurllibrary,building,24limitargument(views),154limitqueryparameter,58Linux,installingCouchDBon,9–28buildingfromsourcecode,19–28Erlang,23ICU,25Libcurllibrary,24Spidermonkey,25Subversion,26configurationoptions,243–46FedoraLinux,14–19UbuntuLinux8.
10,12–15listfunctions,238,281,282_listresource,281,282listingdatabases,258listingdocuments,267,268,269,270listskeys,235loadbalancing,249"Localdatabase"option(replication),83,213loopingthroughJSONarrays,96–102MMacOSX,installingCouchDBon,29–46configurationoptions,243–46MacPortspackagemanager,34–40usingCouchDBX,45–46Xcodedevelopertools,29–34MacPortspackagemanager,installing,34–40mainarea,Futon,63main.
cssfile(styledirectory),170,180mapfunction,110,125,Seealsoviews,Seealsomap/reduceconcept;viewsinCouchAppviews,178CouchDBAPIand,135–36creating,126creatinginFuton,127–35SQLqueriesvs.
,136–38wordcountexample,139–41map/reduceconcept.
SeealsomapfunctioninCouchDB,126–27CouchDBAPIand,135–36defined,125inFuton,127–35reduce.
SeereducefunctionSQLqueriesvs.
,136–38wordcountexample,139–41MapFunctionbox(Futon),130map.
jsfile,178Math.
roundfunction(JavaScript),146maxfunction,147measuringCouchDBperformance,241–43minfunction,147Nnavigationbar,Futon,63nonatomicbulkupdates,234nulldatatype(JSON),89nullvalues,108numberdatatype(JSON),89Oobjects,JSON,50,88,89creating(defining),92orderingresults(views),151–54Overviewheading(Futon),63INDEX293Ppaginationbar(Futon),63passwordforuseraccount,13performanceclustering,250loadbalancing,249measurementof,241–43runtimestatistics,retrieving,253permanentviews,109,113–16indesigndocuments,121executingwithCouchDBAPI,120map/reducewith,135–36map/reduce.
Seemap/reduceconceptquerying,278,279pingcommand,217plus(+)icon(Futon),63POSTrequests(HTTP),50,284fetchingdocumentsinbulk,229–32,275writingdocumentsinbulk,232–35purgingolddocumentrevisions.
SeecompactionpushingCouchAppstoCouchDB,165,168PUTrequests(HTTP),50,284pycurlutility,installing,186Pythonexecutingviewsfrom,190installing,163,185PythonapplicationsCouchdbkitlibrarywith(Python),185–91Djangoframework,185–91Qqueryingdatabase.
Seeviewsqueryingrelateddata,155RRails,installing,191RDBMS(relationaldatabasemanagementsystems),107reducefunction,125,SeealsomapfunctioninCouchAppviews,178CouchDBAPIand,135–36creating,126creatinginFuton,127–35SQLqueriesvs.
,136–38wordcountexample,139–41ReduceFunctionbox(Futon),132reduce.
jsfile,178relateddata,viewsand,154–58relationaldatabasemanagementsystems,107remoteconnectionstodatabases,81"Remotedatabase"option(replication),213_replicateresource,260replicatingdatabases,83–85,211–24,260forbackup,248incrementalreplication,215triggeringreplicationfromapplications,223replicationtestfailure,15Replicatortool(Futon),83–85,211–24incrementalreplication,216requests.
SeeHTTPrequestsrereduceargument(reducefunction),127,148responses.
SeeHTTPresponsesRESTful,CouchDBAPIas,7returningdocumentswithqueries.
Seeviews_revmetafield(documents),103fordesigndocuments,103fetchingdocumentsinbulk,231writingdocumentsinbulk,234reversingresultsorderonviews,152revisions,document,6deletingdocumentsand,55purgingold(compaction),224–28_revfield,103roundfunction(JavaScript),146Rubydevelopingapplicationsin,191–200executingviewsfrom,198installingRubyGems,191runtimestatistics,retrieving,253Ssavingviewsaspermanent,113–16schema-freeDBMS,CouchDBas,5,49security,247–48SELECTstatements(SQL)vs.
map/reduce,136–38serverAPIs,listof,251–55serverclustering,250serverinformation,retrieving,251setuptools(Python),164,185showfunctions,235–38,280_showresource,280showskeys,235sizeofdatabase,determining,227/(slash)asrequestURI,251sourcecode,buildingCouchDBfrom,19–28Erlang,23ICU,25Libcurllibrary,24Spidermonkey,25Subversion,26Spidermonkey,building,25Spidermonkey-basedengine.
SeeJavaScriptviewengineINDEX294SQL(StructuredQueryLanguage),107SQLqueriesvs.
map/reduce,136–38stand-aloneapplications,building,185–209withCouchApp.
SeeCouchAppwithCouchdbkitlibrary(Python),185–91withCouchRestlibrary,191–200withDjangoextensions(Python),200–209startingCouchDBserver,13,18,28startkeyargument(views),153_statsresource,253statuscodesforHTTPresponses,285Statuspage(Futon),82storingrelateddata,155stringdatatype(JSON),89StructuredQueryLanguage.
SeeSQLstructures,JSON,91–96stylesubdirectory(couchappsdirectory),167Subversion,building,26sudocommand,MaxOSXLeopardand,43Ttaskmanagerapplication,building,169–84_temp_viewresource,277temporaryviews,109creating,109–13executingwithCouchDBAPI,119makingpermanent,113–16map/reduce.
Seemap/reduceconceptquerying,277Terminalapplication(MacOS),39Terminalwindow,opening,12,16testdatabases,53TestSuite,running,14,20,29,46databasescreatedby,53total_rowsfield,58triggeringdatabasereplication,223types.
SeedatatypesUUbuntuLinux8.
10,installingCouchDBon,12–15update_notificationsection(local.
ini),249updatingdocuments,57,264inbulk,232–35UploadAttachmentlink(Futon),76–78useraccount,creating,13,27UUIDs,retrieving,255_uuidsresource,255Vversioncontrol,compactionand,228viewAPIs,listof,276–82viewengines,108,SeealsoJavaScriptviewenginemap/reduce.
Seemap/reduceconcept_viewresource,278,279viewingdocuments,271views,7,57–59,107–23,143–59,267advancedaggregation,143–50inCouchApps,178CouchDBAPIand,119–23,135–36creating,109–13fromPython(withCouchdbkit),190fromRuby(withCouchRest),198designdocumentswith,116–18map/reduce.
Seemap/reduceconceptorderingandfilteringresults,151–54permanentviews,109,113–16indesigndocuments,121executingwithCouchDBAPI,120querying,277workingwithrelateddata,154–58viewsfield(designdocuments),103,117viewssubdirectory(couchappsdirectory),178Wwgetutility,201wordcountwithmap/reduce(example),139–41writingdocuments.
Seedocuments,addingtodatabasesX-Xoption,curlutility,51Xcodedevelopertools,installing,29–34X-Couch-Full-Commitheader,264,275Yyum,installingCouchDBusing,14–1

数脉科技:香港服务器低至350元/月;阿里云CN2+BGP线路,带宽10M30M50M100M

数脉科技(shuhost)8月促销:香港独立服务器,自营BGP、CN2+BGP、阿里云线路,新客立减400港币/月,老用户按照优惠码减免!香港服务器带宽可选10Mbps、30Mbps、50Mbps、100Mbps带宽,支持中文本Windows、Linux等系统。数脉香港特价阿里云10MbpsCN2,e3-1230v2,16G内存,1T HDD 或 240G SSD,10Mbps带宽,IPv41个,...

Linode十八周年及未来展望

这两天Linode发布了十八周年的博文和邮件,回顾了过去取得的成绩和对未来的展望。作为一家运营18年的VPS主机商,Linode无疑是有一些可取之处的,商家提供基于KVM架构的VPS主机,支持随时删除(按小时计费),可选包括美国、英国、新加坡、日本、印度、加拿大、德国等全球十多个数据中心,所有机器提供高出入网带宽,最低仅$5/月($0.0075/小时)。This month marks Linod...

LOCVPS洛杉矶CN2线路KVM上线,洛杉矶/香港云地/香港邦联7折

LOCVPS发来了新的洛杉矶CN2线路主机上线通知,基于KVM架构,目前可与香港云地、香港邦联机房XEN架构主机一起适用7折优惠码,优惠后最低美国洛杉矶CN2线路KVM架构2GB内存套餐月付38.5元起。LOCPVS是一家成立较早的国人VPS服务商,目前提供洛杉矶MC、洛杉矶C3、和香港邦联、香港沙田电信、香港大埔、日本东京、日本大阪、新加坡、德国和荷兰等机房VPS主机,基于KVM或者XEN架构。...

http500为你推荐
flashfxpflashfxp怎么用?重庆网络公司一九互联重庆本地的网约车平台有哪些?如何识别比较正规的网约车平台?苹果appstore宕机苹果无法连接到appstore怎么办企业信息查询系统官网怎么查自己办了几个工商营业执照cuteftp什么是CuteFTP?如何将网站内容上传(FTP)到网站空间?flashfxp下载我想下载一个FlashFXP 4.0.0 Build 1510 简体中文版的软件,可是不知道下载地址,希望大家帮帮我?flashfxp下载怎样用FlashFXP从服务器下载到电脑上?X1080012高等数学Ⅱ课程教学大纲资费标准联通所有套餐介绍抢米网怎么用小米商城可以快速抢到手机!大侠们 帮帮忙!
krypt webhosting 圣迭戈 紫田 云图标 英文站群 网站挂马检测工具 域名转向 网站cdn加速 百度云1t 阿里云官方网站 云营销系统 服务器维护 web应用服务器 美国盐湖城 畅行云 万网空间 789电视剧网 博客域名 mteam 更多