Commit 2f66b0f287a836d218cc07bfa71ee2ac8d7da28a

Authored by don ago
1 parent c23c26b05b
Exists in master

지집

Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff

app/SendLog.scala View file @ 2f66b0f
... ... @@ -61,7 +61,7 @@
61 61  
62 62 url = new java.net.URL("http://localhost:8081/log")
63 63 httpcon = url.openConnection.asInstanceOf[java.net.HttpURLConnection]
64   - httpcon.setRequestMethod("POST")
  64 + httpcon.setRequestMethod("PUT")
65 65 httpcon.setRequestProperty("Content-Encoding", "gzip");
66 66  
67 67 httpcon.setDoOutput(true)
68 68  
... ... @@ -82,13 +82,11 @@
82 82 }
83 83 }
84 84 if (cur_line != 0) {
85   - w.flush()
86 85  
87 86 val in = httpcon.getInputStream
88 87 val s = scala.io.Source.fromInputStream(in)("UTF8")
89 88 val r_text = s.mkString
90 89 //println(r_text)
91   - w.close()
92 90 out.close()
93 91 httpcon.disconnect()
94 92 }