0

I need to post data like this to an open telnet

{
  "context" : "50EF2767",
  "data" : {
    "user_status" : "invisible"
  },
  "command" : "setStatus"
}

The data is multiline. I cannot copy-paste it, as telnet treats new lines as Enter.

I tried http://telnet-online.net/ and it works fine Strips new lines

But I need this for localhost.

Is there any telnet client or any way to allow to post multiline data?

1 Answer 1

1

Try netcat (nc). See http://www.thegeekstuff.com/2012/04/nc-command-examples/?utm_source=feedburner for examples on how to use it.

2
  • Hi. Thanks for the suggestion. I tried nc localhost 8080 Thought it allows to post multiline, it strips brackets So I post ``` { "context" : "50EF2767", "data" : { "user_status" : "invisible" }, "command" : "setStatus" } ``` but the server recievs ``` "context" : "50EF2767", "data" : { "user_status" : "invisible" }, "command" : "setStatus" ``` Any suggestion? Thanks. Commented Jul 18, 2017 at 9:10
  • Well, it basically works if prepending and postpending my data with new lines. There is a minor problem that if prepending a newline, it posts 2 messages - empty line and then the data. But without prepending it doesn't post the first bracket { Commented Jul 18, 2017 at 9:21

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.