Rebase besUrl to allow other BesStr API

This commit is contained in:
Simon Rozman 2024-04-02 16:05:05 +02:00
parent 28eea6eb9d
commit 4a23cc057e
4 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@ Primer:
<head> <head>
... ...
<link rel="stylesheet" href="styles.css" /> <link rel="stylesheet" href="styles.css" />
<script>const besUrl = 'http://localhost:225/api/v2/check';</script> <script>const besUrl = 'http://localhost:225/api/v2';</script>
<script src="service.js"></script> <script src="service.js"></script>
</head> </head>
``` ```

View File

@ -5,7 +5,7 @@
<title>CKEditor 5 Example</title> <title>CKEditor 5 Example</title>
<link rel="stylesheet" href="../styles.css" /> <link rel="stylesheet" href="../styles.css" />
<script src="https://cdn.ckeditor.com/ckeditor5/41.1.0/classic/ckeditor.js"></script> <script src="https://cdn.ckeditor.com/ckeditor5/41.1.0/classic/ckeditor.js"></script>
<script>const besUrl = 'http://localhost:225/api/v2/check';</script> <script>const besUrl = 'http://localhost:225/api/v2';</script>
<script src="../service.js"></script> <script src="../service.js"></script>
</head> </head>
<body> <body>

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BesService Example</title> <title>BesService Example</title>
<link rel="stylesheet" href="../styles.css" /> <link rel="stylesheet" href="../styles.css" />
<script>const besUrl = 'http://localhost:225/api/v2/check';</script> <script>const besUrl = 'http://localhost:225/api/v2';</script>
<script src="../service.js"></script> <script src="../service.js"></script>
</head> </head>
<body> <body>

View File

@ -103,7 +103,7 @@ class BesService {
language: node.lang ? node.lang : 'sl', language: node.lang ? node.lang : 'sl',
level: 'picky' level: 'picky'
} }
const request = new Request(besUrl, { const request = new Request(besUrl + '/check', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams(requestData) body: new URLSearchParams(requestData)