@studentsphere/linkgor 0.0.2-alpha → 0.0.3-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -236,7 +236,7 @@ async function loginWithCredentials(instanceId, username, password) {
|
|
|
236
236
|
const serviceUrl = `${scheduleServer}?${params.toString()}`;
|
|
237
237
|
const currentUrl = `${loginServer}?service=${encodeURIComponent(serviceUrl)}`;
|
|
238
238
|
const getRes = await fetch(currentUrl, {
|
|
239
|
-
headers: { "User-Agent": "
|
|
239
|
+
headers: { "User-Agent": "linkgor" }
|
|
240
240
|
});
|
|
241
241
|
const initialCookies = getRes.headers.getSetCookie ? getRes.headers.getSetCookie() : getRes.headers.get("Set-Cookie") ? [getRes.headers.get("Set-Cookie")] : [];
|
|
242
242
|
updateCookies(jar, currentUrl, initialCookies);
|
|
@@ -260,7 +260,7 @@ async function loginWithCredentials(instanceId, username, password) {
|
|
|
260
260
|
const initialCookieHeader = serializeCookies(jar, currentUrl);
|
|
261
261
|
const postHeaders = {
|
|
262
262
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
263
|
-
"User-Agent": "
|
|
263
|
+
"User-Agent": "linkgor"
|
|
264
264
|
};
|
|
265
265
|
if (initialCookieHeader) {
|
|
266
266
|
postHeaders["Cookie"] = initialCookieHeader;
|
|
@@ -294,7 +294,7 @@ async function loginWithCredentials(instanceId, username, password) {
|
|
|
294
294
|
followUrl = new URL(location, followUrl).toString();
|
|
295
295
|
const cookieHeader = serializeCookies(jar, followUrl);
|
|
296
296
|
const redirectHeaders = {
|
|
297
|
-
"User-Agent": "
|
|
297
|
+
"User-Agent": "linkgor"
|
|
298
298
|
};
|
|
299
299
|
if (cookieHeader) {
|
|
300
300
|
redirectHeaders["Cookie"] = cookieHeader;
|
package/dist/index.mjs
CHANGED
|
@@ -204,7 +204,7 @@ async function loginWithCredentials(instanceId, username, password) {
|
|
|
204
204
|
const serviceUrl = `${scheduleServer}?${params.toString()}`;
|
|
205
205
|
const currentUrl = `${loginServer}?service=${encodeURIComponent(serviceUrl)}`;
|
|
206
206
|
const getRes = await fetch(currentUrl, {
|
|
207
|
-
headers: { "User-Agent": "
|
|
207
|
+
headers: { "User-Agent": "linkgor" }
|
|
208
208
|
});
|
|
209
209
|
const initialCookies = getRes.headers.getSetCookie ? getRes.headers.getSetCookie() : getRes.headers.get("Set-Cookie") ? [getRes.headers.get("Set-Cookie")] : [];
|
|
210
210
|
updateCookies(jar, currentUrl, initialCookies);
|
|
@@ -228,7 +228,7 @@ async function loginWithCredentials(instanceId, username, password) {
|
|
|
228
228
|
const initialCookieHeader = serializeCookies(jar, currentUrl);
|
|
229
229
|
const postHeaders = {
|
|
230
230
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
231
|
-
"User-Agent": "
|
|
231
|
+
"User-Agent": "linkgor"
|
|
232
232
|
};
|
|
233
233
|
if (initialCookieHeader) {
|
|
234
234
|
postHeaders["Cookie"] = initialCookieHeader;
|
|
@@ -262,7 +262,7 @@ async function loginWithCredentials(instanceId, username, password) {
|
|
|
262
262
|
followUrl = new URL(location, followUrl).toString();
|
|
263
263
|
const cookieHeader = serializeCookies(jar, followUrl);
|
|
264
264
|
const redirectHeaders = {
|
|
265
|
-
"User-Agent": "
|
|
265
|
+
"User-Agent": "linkgor"
|
|
266
266
|
};
|
|
267
267
|
if (cookieHeader) {
|
|
268
268
|
redirectHeaders["Cookie"] = cookieHeader;
|
package/package.json
CHANGED