mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-09-04 03:17:55 +00:00
Migrate all examples to use tweaked.cc
Might as well, I've got the server capacity to spare. Hopefully.
This commit is contained in:
@@ -16,7 +16,7 @@ This event is normally handled inside @{http.get} and @{http.post}, but it can s
|
||||
## Example
|
||||
Prints an error why the website cannot be contacted:
|
||||
```lua
|
||||
local myURL = "http://this.website.does.not.exist"
|
||||
local myURL = "https://does.not.exist.tweaked.cc"
|
||||
http.request(myURL)
|
||||
local event, url, err
|
||||
repeat
|
||||
|
@@ -11,7 +11,7 @@ The @{websocket_closed} event is fired when an open WebSocket connection is clos
|
||||
## Example
|
||||
Prints a message when a WebSocket is closed (this may take a minute):
|
||||
```lua
|
||||
local myURL = "ws://echo.websocket.org"
|
||||
local myURL = "wss://example.tweaked.cc/echo"
|
||||
local ws = http.websocket(myURL)
|
||||
local event, url
|
||||
repeat
|
||||
|
@@ -15,7 +15,7 @@ This event is normally handled inside @{http.websocket}, but it can still be see
|
||||
## Example
|
||||
Prints an error why the website cannot be contacted:
|
||||
```lua
|
||||
local myURL = "ws://this.website.does.not.exist"
|
||||
local myURL = "wss://example.tweaked.cc/not-a-websocket"
|
||||
http.websocketAsync(myURL)
|
||||
local event, url, err
|
||||
repeat
|
||||
|
@@ -14,7 +14,7 @@ This event is normally handled by @{http.Websocket.receive}, but it can also be
|
||||
## Example
|
||||
Prints a message sent by a WebSocket:
|
||||
```lua
|
||||
local myURL = "ws://echo.websocket.org"
|
||||
local myURL = "wss://example.tweaked.cc/echo"
|
||||
local ws = http.websocket(myURL)
|
||||
ws.send("Hello!")
|
||||
local event, url, message
|
||||
|
@@ -15,7 +15,7 @@ This event is normally handled inside @{http.websocket}, but it can still be see
|
||||
## Example
|
||||
Prints the content of a website (this may fail if the request fails):
|
||||
```lua
|
||||
local myURL = "ws://echo.websocket.org"
|
||||
local myURL = "wss://example.tweaked.cc/echo"
|
||||
http.websocketAsync(myURL)
|
||||
local event, url, handle
|
||||
repeat
|
||||
|
Reference in New Issue
Block a user