session.parseBody(new HashMap<String, String>());
Map<String, List<String>> map = session.getParameters();
Iterator<String> i = map.keySet().iterator();
String s = i.next();
最後這個s就是post過來的所有數據session
易語言的post的頭信息以下content-length=6431, remote-addr=175.9.235.15, accept-language=zh-cn, http-client-ip=175.9.235.15, host=121.196.238.126:11007, connection=Keep-Alive, content-type=application/x-www-form-urlencoded; Charset=UTF-8, accept=*/*, user-agent=Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1; 2Pac; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)app
數據類型是application/x-www-form-urlencoded,這個要特別注意post
易語言給nanohttpd傳輸base64數據的話,先將base64進行url編碼,不然nanohttpd接收到後,會有編碼問題,好比+變成了空格編碼
nanohttpd若是接收的是formdata類型的數據,能夠這樣url
session.parseBody(new HashMap<String, String>()); Map<String, List<String>> map = session.getParameters(); map.get("paramName").get(0);
paramStr表明的是鍵,後面的0是固定的spa
String>> map = session.getParameters(); Iterator<String> code