@highpoint/js-fetch
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -1,8 +0,11 @@ | ||
# v0.1.0 | ||
* Initial release | ||
# v0.1.3 | ||
* Support IScript functions other than `IScript_Main` | ||
# v0.1.2 | ||
* Fix CSRF cookie name | ||
# v0.1.1 | ||
* Automatically add `postDataBin=y` to JSON requests (if it's not already there) | ||
# v0.1.2 | ||
* Fix CSRF cookie name | ||
# v0.1.0 | ||
* Initial release |
@@ -13,3 +13,3 @@ 'use strict'; | ||
var baseURI = (document.baseURI || document.querySelector('base').href).replace('IScript_Main', 'IScript_'); | ||
var baseURI = (document.baseURI || document.querySelector('base').href).replace(/IScript_.*/, 'IScript_'); | ||
@@ -24,2 +24,3 @@ var isFramed = function () { | ||
// @link https://stackoverflow.com/a/25490531/719817 | ||
var getCookieValue = function getCookieValue(name) { | ||
@@ -26,0 +27,0 @@ var match = document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)'); |
{ | ||
"name": "@highpoint/js-fetch", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "HighPoint Fetch Library", | ||
@@ -5,0 +5,0 @@ "main": "dist/js-fetch.js", |
@@ -19,3 +19,3 @@ # js-fetch | ||
GET request | ||
### GET request | ||
@@ -35,3 +35,3 @@ ```javascript | ||
POST Form | ||
### POST Form | ||
@@ -54,3 +54,3 @@ ```javascript | ||
POST JSON | ||
### POST JSON | ||
@@ -75,1 +75,24 @@ ```javascript | ||
``` | ||
### Using `<base>` HREF | ||
```html | ||
... | ||
<base href="https://ps.example.com/psc/csdev/EMPLOYEE/SA/s/WEBLIB.ISCRIPT1.FieldFormula.IScript_Main"> | ||
... | ||
``` | ||
```javascript | ||
import { json } from '@highpoint/js-fetch'; | ||
(async () => { | ||
try { | ||
const jsonResponse = await json('TermOptions'); | ||
console.log(jsonResponse); | ||
} catch (e) { | ||
// Handle the exception | ||
} | ||
})(); | ||
``` | ||
GET request would be made to `https://ps.example.com/psc/csdev/EMPLOYEE/SA/s/WEBLIB.ISCRIPT1.FieldFormula.IScript_TermOptions`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11711
183
95