This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os._ | |
| import io.circe._, io.circe.parser._ | |
| import scala.meta._ | |
| import org.scalafmt.Scalafmt._ | |
| import org.scalafmt.config.ScalafmtConfig | |
| /* | |
| - parse the events json. take note of inner objects | |
| take the "defintions" key/value pair check if there's a "$ref" in definitions, | |
| and parse it into json separately. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export async function checkWhetherURLExists(url: URL) { | |
| try{ | |
| const response = await fetch(url.origin); | |
| return response.status == 200 | |
| } catch(error){ | |
| return new Response("something went wronger") | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import zio._ | |
| case class Doc( | |
| title: String, | |
| description: String, | |
| language: String, | |
| format: String, | |
| content: Array[Byte] | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var wsUri = "wss://ws.postman-echo.com/raw"; | |
| var log; | |
| var websocket; | |
| var inactivityTimeout; | |
| function init(){ | |
| log = document.getElementById("log"); | |
| testWebSocket(); | |
| } |