Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
ãã¼ã»ã³ãã¨ã³ã³ã¼ãã£ã³ã° (è±: percent-encoding) ã¨ã¯ãURIã«ããã¦ä½¿ç¨ã§ããªãæåã使ãéã«è¡ãããã¨ã³ã³ã¼ãï¼ä¸ç¨®ã®ã¨ã¹ã±ã¼ãï¼ã®å称ã§ããã ã%ãã使ç¨ãã¦ãããã¨ããããã®å称ã§å¼ã°ãã¦ãããä¸è¬ã«URLã¨ã³ã³ã¼ãã¨ã称ãããã URLã¨ã³ã³ã¼ãã«ã¯ãä¸è¨ã®ãã¼ã»ã³ãã¨ã³ã³ã¼ãã£ã³ã°ã«ãã符å·åã¨ä»¥ä¸ã«è¨è¿°ããapplication/x-www-form-urlencodedã«ãã符å·åã®2種é¡ããããåè§ã¹ãã¼ã¹ã¯ãã¼ã»ã³ãã¨ã³ã³ã¼ãã£ã³ã°ã§ã¯ã%20ãã«ç¬¦å·åãããããapplication/x-www-form-urlencodedã«ãã符å·åã§ã¯ã+ãã«ç¬¦å·åãããã URL Standardã§ã¯ãURLã®ãã¹é¨åã®æ§æ解æã®éãä»¥ä¸ (path percent-encode set) ã«è©²å½ããæåã§ããã°ãUTF-8ã§ç¬¦å·åã®ãããã¼ã»ã³ãã¨ã³
ãªãexpressã¯ã¬ã¹ãã³ã¹ãè¿ãã¨ãã®JSONã¯é©åã«å¦çãã¦ããããã ãã©ãç¾ç¶ã§ã¯ãªã¯ã¨ã¹ãã¨ãã¦JSONãPOST/PUTããã¦ããã¨ãã«ã¯ãããã©ãã«ããã¦ããããããªãã®ã§ãèªå㧠JSON.parse() ã«ããã¦ããå¿ è¦ããã£ãããã¦ã¡ãã£ã¨æ®å¿µããã®ç¹ããã©ã¼ã å½¢å¼ã 㨠app.use(express.bodyParser()); ãã¦ããã°ãªãã¸ã§ã¯ãããåãåºããã®ã§ä¾¿å©ã§ãªãã¨ãªãç´å¾ã®ãããªããã®ãæããã http://d.hatena.ne.jp/tagomoris/20110906/1315279065 ããããªã¯ã¨ã¹ããããã§ContentTypeãapplication/jsonã«ããã°å¦çã§ãããããã nodeå´ããã㧠var express = require('express'); var app = module.exports = exp
Node.js: GET ãªã¯ã¨ã¹ããè¡ãExpress: POST ãªã¯ã¨ã¹ããå¦çããNode.js: request ã¢ã¸ã¥ã¼ã«ã使ã£ã¦ GET ãªã¯ã¨ã¹ããè¡ãNode.js: request ã¢ã¸ã¥ã¼ã«ã使ã£ã¦ POST ãªã¯ã¨ã¹ããè¡ãNode.js: superagent ã¢ã¸ã¥ã¼ã«ã使ã£ã¦ GETãPOST ãªã¯ã¨ã¹ããè¡ãNode.js: Restler ã使ã£ã¦ GETãPOST ãªã¯ã¨ã¹ããè¡ãNode.js: connect ã使ã£ã¦ http ãµã¼ãã¼ãç«ã¡ä¸ãã GET ãªã¯ã¨ã¹ãã«ç¶ããPOST ãªã¯ã¨ã¹ãã request ã¢ã¸ã¥ã¼ã«ã使ã£ã¦è¡ãããã©ã¼ãããããapplication/x-www-form-urlencodedãå½¢å¼ã§éä¿¡ããå ´åãform ããããã£ã§æå®ãããã¬ã¹ãã³ã¹ã JSON ã®å ´åãjson ããããã£ã« true ãæå®ããã°
ã©ã³ãã³ã°
ã¡ã³ããã³ã¹
ãç¥ãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}