(Yes, I know it's a bad title.. But I couldn't think of anything better.)
So:
When I use the http.get("url") to get text from my site and I write it to a monitor, it gets it all on one line even though I have it like so:
This is a line.
This is a second line.
So, my question:
Why does it do that?
Can I fix it somehow?
And if I can fix it, how?
Thanks // Mackan90096
[Question] New line from text on internet
Started by Mackan90096, Jun 19 2013 01:43 AM
2 replies to this topic
#1
Posted 19 June 2013 - 01:43 AM
#2
Posted 19 June 2013 - 02:13 AM
Im not sure why it does that to be very honest.. But, you can easily fix it by doing something like this:
local resp = http.get("http://engineercoding.koding.com") -- My dutch site :P/>
local content = {}
if resp then
for line in resp.readLine do
table.insert(content, line)
end
else
print("Connection failed")
end
#3
Posted 19 June 2013 - 04:14 AM
Engineer, on 19 June 2013 - 02:13 AM, said:
Im not sure why it does that to be very honest.. But, you can easily fix it by doing something like this:
local resp = http.get("http://engineercoding.koding.com") -- My dutch site :P/>/>
local content = {}
if resp then
for line in resp.readLine do
table.insert(content, line)
end
else
print("Connection failed")
end
Thanks!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











