Client should shutdown write after send all request data, so pybeautifier server will receive an empty chunk.
This commit is contained in:
parent
41d5051b39
commit
6df7403c63
|
@ -23,6 +23,7 @@ format = (data, formatters) ->
|
|||
client.connect PORT, HOST, ->
|
||||
client.setEncoding('utf8')
|
||||
client.write(JSON.stringify({'data': data, 'formatters': formatters}))
|
||||
client.end()
|
||||
response = ''
|
||||
client.on 'data', (chunk) ->
|
||||
response += chunk
|
||||
|
|
Loading…
Reference in New Issue