René's URL Explorer Experiment


Title: [Enhancement] Configure additional options passed to the Fetch API · Issue #5 · contentstack/contentstack-javascript · GitHub

Open Graph Title: [Enhancement] Configure additional options passed to the Fetch API · Issue #5 · contentstack/contentstack-javascript

X Title: [Enhancement] Configure additional options passed to the Fetch API · Issue #5 · contentstack/contentstack-javascript

Description: Do you want to request a feature or report a bug? Feature Patch v1: contentstack-javascript-issue-5-patch-v1.diff.txt to apply on 6abdf0a (the currently last master commit). What is the current behavior? Currently, the Request function i...

Open Graph Description: Do you want to request a feature or report a bug? Feature Patch v1: contentstack-javascript-issue-5-patch-v1.diff.txt to apply on 6abdf0a (the currently last master commit). What is the current beh...

X Description: Do you want to request a feature or report a bug? Feature Patch v1: contentstack-javascript-issue-5-patch-v1.diff.txt to apply on 6abdf0a (the currently last master commit). What is the current beh...

Opengraph URL: https://github.com/contentstack/contentstack-javascript/issues/5

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Enhancement] Configure additional options passed to the Fetch API","articleBody":"## Do you want to request a *feature* or report a *bug*?\r\n\r\n__Feature__\r\n\r\nPatch v1: [contentstack-javascript-issue-5-patch-v1.diff.txt](https://github.com/builtio-contentstack/contentstack-javascript/files/1754381/contentstack-javascript-issue-5-patch-v1.diff.txt) to apply on 6abdf0a (the currently last master commit).\r\n\r\n## What is the current behavior?\r\n\r\nCurrently, the [Request](https://github.com/builtio-contentstack/contentstack-javascript/blob/6abdf0a7aeb12bf557ae7f76d31946914b5896cd/src/core/lib/request.js) function is used (in [Query](https://github.com/builtio-contentstack/contentstack-javascript/blob/master/src/core/modules/query.js), [Entry](https://github.com/builtio-contentstack/contentstack-javascript/blob/master/src/core/modules/entry.js) and [Assets](https://github.com/builtio-contentstack/contentstack-javascript/blob/master/src/core/modules/assets.js) modules) to make the HTTP requests to the [Contentstack's Content Delivery API](https://www.contentstack.com/docs/apis/content-delivery-api/).\r\n\r\nUnder the hood, [Request used the Fetch API](https://github.com/builtio-contentstack/contentstack-javascript/blob/6abdf0a7aeb12bf557ae7f76d31946914b5896cd/src/core/lib/request.js#L43) (polyfilled at runtime with [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) if needed) to process the HTTP requests.\r\n\r\n```javascript\r\n// File: src/core/lib/request.js\r\n// Version: 6abdf0a (on Jan 2, 2018, 10:08 AM GMT+1)\r\n// Lines: 43-46\r\n\r\nfetch(url + '?' + queryParams, {\r\n  method: 'GET',\r\n  headers: headers\r\n})\r\n```\r\nAs we can see: __there is a no way to configure additional options into the `init` parameter__ ([the second parameter of the Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Syntax) which currently contains `method` and `headers` options only).\r\n\r\n## What is the expected behavior?\r\n\r\n__Allowing to configure additional options passed to the Fetch API's `init` parameter.__\r\n\r\nIdeally, we should be allowed to passed that additional options in two levels:\r\n\r\n* Defaults additional options used for __every__ HTTP queries ;\r\n* Additional options use for __some__ HTTP queries (merged to the defaults additional options).\r\n\r\n### Use case example\r\n\r\nIn Node.js: using an [http(s).Agent](https://nodejs.org/api/http.html#http_class_http_agent) instance to allows custom proxy.\r\n\r\nIt's a frequent use case when the Node.js process is running behind a corporate/security/policy proxy.\r\n\r\nIf we can't configure the agent, we won't be able to request the [Contentstack's Content Delivery API](https://www.contentstack.com/docs/apis/content-delivery-api/) with the [JavaScript SDK for Contentstack](https://www.contentstack.com/docs/platforms/javascript-browser/api-reference/index.html) (package [contentstack-javascript](https://github.com/builtio-contentstack/contentstack-javascript/)).\r\n\r\n\r\n```javascript\r\nconst HttpProxyAgent = require(\"http-proxy-agent\");\r\n\r\nconst proxyAgent = new HttpProxyAgent(\"http://corporate-proxy.local/\");\r\n\r\n// +-----------\r\n// | \u003e Scenario A: START\r\n// | \u003e Configure the agent to be used for every HTTP queries.\r\n// |\r\n\r\nconst Stack = Contentstack.Stack(\"api_key\", \"access_token\", \"environment_name\", {\r\n  agent: proxyAgent\r\n});\r\n\r\nconst Query = Stack.ContentType('blog').Entry(\"blt123something\");\r\n\r\n// |\r\n// | \u003e\u003e Schenario A.1:\r\n// | \u003e\u003e Execute the query through the default  agent\r\n// |\r\n\r\nQuery.fetch().then(/* ... */);\r\n\r\n// |\r\n// | \u003e\u003e Schenario A.2:\r\n// | \u003e\u003e Execute the query through another agent than the default one.\r\n// |\r\n\r\nconst anotherProxyAgent = new HttpProxyAgent(\"http://another-corporate-proxy.local/\");\r\n\r\nQuery.fetch({ agent: anotherProxyAgent }).then(/* ... */);\r\n\r\n// |\r\n// | \u003e Scenario A: END\r\n// +-----------\r\n\r\n// +-----------\r\n// | \u003e Scenario B: START\r\n// | \u003e No agent is configure by default. The agent is configure \r\n// | \u003e for a specific request execution.\r\n\r\nconst Stack = Contentstack.Stack(\"api_key\", \"access_token\", \"environment_name\", { agent: proxyAgent });\r\n\r\nconst Query = Stack.ContentType('blog').Entry(\"blt123something\");\r\n\r\nQuery.fetch({ agent: proxyAgent }).then(/* ... */);\r\n\r\n// |\r\n// | \u003e Scenario B: END\r\n// +-----------\r\n```\r\n\r\n### Implementation suggested\r\n\r\nThat can be achieved by extending some functions' interface:\r\n\r\n* [`Stack()`](https://www.contentstack.com/docs/platforms/javascript-browser/api-reference/global.html#Stack)\r\n    ```javascript\r\n    var Stack = Contentstack.Stack('api_key', 'access_token', 'environment', {\r\n      // default additional fetch's init options\r\n    });\r\n    // OR\r\n    var Stack = Contentstack.Stack({\r\n        'api_key':'bltsomethingapikey',\r\n        'access_token':'bltsomethongtoken',\r\n        'environment':'environment_name',\r\n        'fetchOptions': {\r\n          // default additional fetch's init options\r\n        }\r\n      });\r\n    ```\r\n* [`fetch()`](https://www.contentstack.com/docs/platforms/javascript-browser/api-reference/global.html#fetch)\r\n    ```javascript\r\n    /**\r\n     * @method fetch\r\n     * @param {Object} [fetchOptions] Any custom settings that you want to apply to the request.\r\n     */\r\n    fetch(fetchOptions?: Object) {}\r\n    ```\r\n* [`find()`](https://www.contentstack.com/docs/platforms/javascript-browser/api-reference/global.html#find)\r\n    ```javascript\r\n    /**\r\n     * @method find\r\n     * @param {Object} [fetchOptions] Any custom settings that you want to apply to the request.\r\n     */\r\n    find(fetchOptions?: Object) {}\r\n    ```\r\n* [`findOne()`](https://www.contentstack.com/docs/platforms/javascript-browser/api-reference/global.html#findOne)\r\n    ```javascript\r\n    /**\r\n     * @method findOne\r\n     * @deprecated since verion 3.3.0\r\n     * @param {Object} [fetchOptions] Any custom settings that you want to apply to the request.\r\n     */\r\n    findOne(fetchOptions?: Object) {}\r\n    ```\r\n* [`Request` (src/core/lib/requests.js)](https://github.com/builtio-contentstack/contentstack-javascript/blob/master/src/core/lib/request.js)\r\n    ```javascript\r\n    /**\r\n     * @method Request\r\n     * @param {Object} requestParams Query instance's request params.\r\n     * @param {Object} [fetchOptions] Any custom settings that you want to apply to the request.\r\n     */\r\n    function Request(requestParams: Object, fetchOptions?: Object) {}\r\n    ```\r\n* [`sendRequest` (src/core/lib/utils.js)](https://github.com/builtio-contentstack/contentstack-javascript/blob/master/src/core/lib/utils.js)\r\n    ```javascript\r\n    /**\r\n     * @method sendRequest\r\n     * @param {Object} queryObject Query instance.\r\n     * @param {Object} [fetchOptions] Any custom settings that you want to apply to the request.\r\n     */\r\n    function sendRequest(queryObject: Query. fetchOptions?: Object) {}\r\n    ```\r\n\r\n### Patch\r\n\r\nPatch v1: [contentstack-javascript-issue-5-patch-v1.diff.txt](https://github.com/builtio-contentstack/contentstack-javascript/files/1754381/contentstack-javascript-issue-5-patch-v1.diff.txt) to apply on 6abdf0a (the currently last master commit).\r\n\r\n\u003cdetails\u003e\r\n \u003csummary\u003eClick to toggle contents of contentstack-javascript-issue-5-patch-v1.diff\u003c/summary\u003e\r\n\r\n```js\r\ndiff --git a/src/core/lib/request.js b/src/core/lib/request.js\r\nindex 9255650..4b58a13 100644\r\n--- a/src/core/lib/request.js\r\n+++ b/src/core/lib/request.js\r\n@@ -4,7 +4,7 @@ import fetch from \"runtime/http.js\";\r\n //JS SDK version\r\n let version = '{{VERSION}}';\r\n \r\n-export default function Request(options) {\r\n+export default function Request(options, fetchOptions) {\r\n     return new Promise(function(resolve, reject) {\r\n         let queryParams;\r\n         let serialize = function(obj, prefix) {\r\n@@ -40,10 +40,14 @@ export default function Request(options) {\r\n             queryParams = serialize(options.body);\r\n         }\r\n \r\n-        fetch(url + '?' + queryParams, {\r\n-                method: 'GET',\r\n-                headers: headers\r\n-            })\r\n+        const _fetchOptions = Utils.mergeDeep.call(Utils, {}, fetchOptions);\r\n+\r\n+        Utils.mergeDeep.call(Utils, _fetchOptions, {\r\n+            method: 'GET',\r\n+            headers: headers\r\n+        });\r\n+\r\n+        fetch(url + '?' + queryParams, _fetchOptions)\r\n             .then(function(response) {\r\n                 if (response.ok \u0026\u0026 response.status === 200) {\r\n                     let data = response.json();\r\ndiff --git a/src/core/lib/utils.js b/src/core/lib/utils.js\r\nindex 7e59d35..982b89a 100644\r\n--- a/src/core/lib/utils.js\r\n+++ b/src/core/lib/utils.js\r\n@@ -186,7 +186,9 @@ export function spreadResult(result) {\r\n     return _results;\r\n };\r\n \r\n-export function sendRequest(queryObject) {\r\n+export function sendRequest(queryObject, fetchOptions) {\r\n+    let _utils = this;\r\n+\r\n     let env_uid = queryObject.environment_uid;\r\n     if (env_uid) {\r\n         queryObject._query.environment_uid = env_uid;\r\n@@ -235,7 +237,9 @@ export function sendRequest(queryObject) {\r\n \r\n     let callback = function(continueFlag, resolve, reject) {\r\n         if (continueFlag) {\r\n-            Request(queryObject.requestParams)\r\n+            const _fetchOptions = mergeDeep.call(_utils, queryObject.fetchOptions, fetchOptions);\r\n+\r\n+            Request(queryObject.requestParams, _fetchOptions)\r\n                 .then(function(data) {\r\n                     try {\r\n                         self.entry_uid = self.asset_uid = self.tojson = self.queryCachePolicy = undefined;\r\ndiff --git a/src/core/modules/assets.js b/src/core/modules/assets.js\r\nindex 16c1cfd..5c3d96f 100644\r\n--- a/src/core/modules/assets.js\r\n+++ b/src/core/modules/assets.js\r\n@@ -68,11 +68,12 @@ export default class Assets {\r\n \r\n     /**\r\n      * @method fetch\r\n+     * @param {Object} [fetchOptions] Any custom settings that you want to apply to the request.\r\n      * @description fetch asset obhect of requested Asset uid of defined query if present.\r\n      * @example\r\n      * Stack.Assets('bltsomething123').fetch()\r\n      */\r\n-    fetch() {\r\n+    fetch(fetchOptions) {\r\n         if (this.asset_uid) {\r\n             this.requestParams = {\r\n                 method: 'POST',\r\n@@ -84,7 +85,7 @@ export default class Assets {\r\n                 }\r\n             }\r\n \r\n-            return Utils.sendRequest(this);\r\n+            return Utils.sendRequest(this, fetchOptions);\r\n         } else {\r\n             console.error(\"Kindly provide an asset uid. e.g. .Assets('bltsomething123')\");\r\n         }\r\ndiff --git a/src/core/modules/entry.js b/src/core/modules/entry.js\r\nindex 992077c..29f9d3d 100644\r\n--- a/src/core/modules/entry.js\r\n+++ b/src/core/modules/entry.js\r\n@@ -208,11 +208,12 @@ export default class Entry {\r\n \r\n     /**\r\n      * @method fetch\r\n+     * @param {Object} [fetchOptions] Any custom settings that you want to apply to the request.\r\n      * @description fetch entry of requested content_type of defined query if present.\r\n      * @example\r\n      * blogEntry.fetch()\r\n      */\r\n-    fetch() {\r\n+    fetch(fetchOptions) {\r\n         if (this.entry_uid) {\r\n             this.requestParams = {\r\n                 method: 'POST',\r\n@@ -223,7 +224,7 @@ export default class Entry {\r\n                     query: this._query\r\n                 }\r\n             };\r\n-            return Utils.sendRequest(this);\r\n+            return Utils.sendRequest(this, fetchOptions);\r\n         } else {\r\n             console.error(\"Kindly provide an entry uid. e.g. .Entry('bltsomething123')\");\r\n         }\r\ndiff --git a/src/core/modules/query.js b/src/core/modules/query.js\r\nindex 0ff9a05..3a86161 100644\r\n--- a/src/core/modules/query.js\r\n+++ b/src/core/modules/query.js\r\n@@ -436,11 +436,12 @@ export default class Query extends Entry {\r\n \r\n     /**\r\n      * @method find\r\n+     * @param {Object} [fetchOptions] Any custom settings that you want to apply to the request.\r\n      * @description Provides all the entries which satisfied the query specified.\r\n      * @example\r\n      * blogQuery.find()\r\n      */\r\n-    find() {\r\n+    find(fetchOptions) {\r\n         const host = this.config.protocol + \"://\" + this.config.host + ':' + this.config.port + '/' + this.config.version,\r\n             url = (this.type \u0026\u0026 this.type === 'asset') ? host + this.config.urls.assets : host + this.config.urls.content_types + this.content_type_uid + this.config.urls.entries;\r\n         this.requestParams = {\r\n@@ -452,17 +453,18 @@ export default class Query extends Entry {\r\n                 query: this._query\r\n             }\r\n         };\r\n-        return Utils.sendRequest(this);\r\n+        return Utils.sendRequest(this, fetchOptions);\r\n     }\r\n \r\n     /**\r\n      * @method findOne\r\n      * @deprecated since verion 3.3.0\r\n+     * @param {Object} [fetchOptions] Any custom settings that you want to apply to the request.\r\n      * @description Provides the single entry from the resultset.\r\n      * @example\r\n      * blogQuery.findOne()\r\n      */\r\n-    findOne() {\r\n+    findOne(fetchOptions) {\r\n         const host = this.config.protocol + \"://\" + this.config.host + ':' + this.config.port + '/' + this.config.version,\r\n             url = (this.type \u0026\u0026 this.type === 'asset') ? host + this.config.urls.assets : host + this.config.urls.content_types + this.content_type_uid + this.config.urls.entries;\r\n         this.singleEntry = true;\r\n@@ -476,7 +478,7 @@ export default class Query extends Entry {\r\n                 query: this._query\r\n             }\r\n         };\r\n-        return Utils.sendRequest(this);\r\n+        return Utils.sendRequest(this, fetchOptions);\r\n     }\r\n \r\n }\r\n\\ No newline at end of file\r\ndiff --git a/src/core/stack.js b/src/core/stack.js\r\nindex 33a1530..76a5f78 100644\r\n--- a/src/core/stack.js\r\n+++ b/src/core/stack.js\r\n@@ -24,17 +24,20 @@ export default class Stack {\r\n                         access_token: stack_arguments[0].access_token\r\n                     };\r\n                     this.environment = stack_arguments[0].environment;\r\n+                    this.fetchOptions = stack_arguments[0].fetchOptions || {};\r\n                     return this;\r\n                 } else {\r\n                     console.error(\"Kindly provide valid object parameters.\");\r\n                 }\r\n             case 3:\r\n+            case 4:\r\n                 if (typeof stack_arguments[0] === \"string\" \u0026\u0026 typeof stack_arguments[1] === \"string\" \u0026\u0026 typeof stack_arguments[2] === \"string\") {\r\n                     this.headers = {\r\n                         api_key: stack_arguments[0],\r\n                         access_token: stack_arguments[1]\r\n                     };\r\n                     this.environment = stack_arguments[2];\r\n+                    this.fetchOptions = stack_arguments[3] || {};\r\n                     return this;\r\n                 } else {\r\n                     console.error(\"Kindly provide valid string parameters.\");\r\n\r\n```\r\n\u003c/details\u003e","author":{"url":"https://github.com/enten","@type":"Person","name":"enten"},"datePublished":"2018-02-24T13:14:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/5/contentstack-javascript/issues/5"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:403dc4ca-a33b-b1f5-12f3-cabb3267f1e1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8BF6:29F505:270EE17:3337868:69819C1A
html-safe-noncebcb4f79e58c0541a35b504b68d3c42efa56abfc80c64180c5b8d0e2df79ad063
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QkY2OjI5RjUwNToyNzBFRTE3OjMzMzc4Njg6Njk4MTlDMUEiLCJ2aXNpdG9yX2lkIjoiNDQ1NjM3MDk4MzM0MjgwODA5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3d8094b75e9e082eef332f04d5e1a595fc3a40a913bda2744f8674a8b064b780
hovercard-subject-tagissue:299940366
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/contentstack/contentstack-javascript/5/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7c47b37560af29f1fb9602790ae0c7a9155366d3a63b38cb147b2cda69c00a4c/contentstack/contentstack-javascript/issues/5
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7c47b37560af29f1fb9602790ae0c7a9155366d3a63b38cb147b2cda69c00a4c/contentstack/contentstack-javascript/issues/5
og:image:altDo you want to request a feature or report a bug? Feature Patch v1: contentstack-javascript-issue-5-patch-v1.diff.txt to apply on 6abdf0a (the currently last master commit). What is the current beh...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameenten
hostnamegithub.com
expected-hostnamegithub.com
Nonee137814e266030874fd2c86863529d0622b13889eeda04148c57654b6ea84ad6
turbo-cache-controlno-preview
go-importgithub.com/contentstack/contentstack-javascript git https://github.com/contentstack/contentstack-javascript.git
octolytics-dimension-user_id24450751
octolytics-dimension-user_logincontentstack
octolytics-dimension-repository_id76627300
octolytics-dimension-repository_nwocontentstack/contentstack-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id76627300
octolytics-dimension-repository_network_root_nwocontentstack/contentstack-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasedd58d68a7813bbec9c91422c8c35f4af33832d70
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/contentstack/contentstack-javascript/issues/5#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcontentstack%2Fcontentstack-javascript%2Fissues%2F5
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcontentstack%2Fcontentstack-javascript%2Fissues%2F5
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=contentstack%2Fcontentstack-javascript
Reloadhttps://github.com/contentstack/contentstack-javascript/issues/5
Reloadhttps://github.com/contentstack/contentstack-javascript/issues/5
Reloadhttps://github.com/contentstack/contentstack-javascript/issues/5
contentstack https://github.com/contentstack
contentstack-javascripthttps://github.com/contentstack/contentstack-javascript
Notifications https://github.com/login?return_to=%2Fcontentstack%2Fcontentstack-javascript
Fork 24 https://github.com/login?return_to=%2Fcontentstack%2Fcontentstack-javascript
Star 33 https://github.com/login?return_to=%2Fcontentstack%2Fcontentstack-javascript
Code https://github.com/contentstack/contentstack-javascript
Issues 1 https://github.com/contentstack/contentstack-javascript/issues
Pull requests 3 https://github.com/contentstack/contentstack-javascript/pulls
Actions https://github.com/contentstack/contentstack-javascript/actions
Projects 0 https://github.com/contentstack/contentstack-javascript/projects
Security 0 https://github.com/contentstack/contentstack-javascript/security
Insights https://github.com/contentstack/contentstack-javascript/pulse
Code https://github.com/contentstack/contentstack-javascript
Issues https://github.com/contentstack/contentstack-javascript/issues
Pull requests https://github.com/contentstack/contentstack-javascript/pulls
Actions https://github.com/contentstack/contentstack-javascript/actions
Projects https://github.com/contentstack/contentstack-javascript/projects
Security https://github.com/contentstack/contentstack-javascript/security
Insights https://github.com/contentstack/contentstack-javascript/pulse
New issuehttps://github.com/login?return_to=https://github.com/contentstack/contentstack-javascript/issues/5
New issuehttps://github.com/login?return_to=https://github.com/contentstack/contentstack-javascript/issues/5
[Enhancement] Configure additional options passed to the Fetch APIhttps://github.com/contentstack/contentstack-javascript/issues/5#top
https://github.com/rohitmishra209
enhancementhttps://github.com/contentstack/contentstack-javascript/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/enten
https://github.com/enten
entenhttps://github.com/enten
on Feb 24, 2018https://github.com/contentstack/contentstack-javascript/issues/5#issue-299940366
contentstack-javascript-issue-5-patch-v1.diff.txthttps://github.com/builtio-contentstack/contentstack-javascript/files/1754381/contentstack-javascript-issue-5-patch-v1.diff.txt
6abdf0ahttps://github.com/contentstack/contentstack-javascript/commit/6abdf0a7aeb12bf557ae7f76d31946914b5896cd
Requesthttps://github.com/builtio-contentstack/contentstack-javascript/blob/6abdf0a7aeb12bf557ae7f76d31946914b5896cd/src/core/lib/request.js
Queryhttps://github.com/builtio-contentstack/contentstack-javascript/blob/master/src/core/modules/query.js
Entryhttps://github.com/builtio-contentstack/contentstack-javascript/blob/master/src/core/modules/entry.js
Assetshttps://github.com/builtio-contentstack/contentstack-javascript/blob/master/src/core/modules/assets.js
Contentstack's Content Delivery APIhttps://www.contentstack.com/docs/apis/content-delivery-api/
Request used the Fetch APIhttps://github.com/builtio-contentstack/contentstack-javascript/blob/6abdf0a7aeb12bf557ae7f76d31946914b5896cd/src/core/lib/request.js#L43
isomorphic-fetchhttps://github.com/matthew-andrews/isomorphic-fetch
the second parameter of the Fetch APIhttps://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Syntax
http(s).Agenthttps://nodejs.org/api/http.html#http_class_http_agent
Contentstack's Content Delivery APIhttps://www.contentstack.com/docs/apis/content-delivery-api/
JavaScript SDK for Contentstackhttps://www.contentstack.com/docs/platforms/javascript-browser/api-reference/index.html
contentstack-javascripthttps://github.com/builtio-contentstack/contentstack-javascript/
Stack()https://www.contentstack.com/docs/platforms/javascript-browser/api-reference/global.html#Stack
fetch()https://www.contentstack.com/docs/platforms/javascript-browser/api-reference/global.html#fetch
find()https://www.contentstack.com/docs/platforms/javascript-browser/api-reference/global.html#find
findOne()https://www.contentstack.com/docs/platforms/javascript-browser/api-reference/global.html#findOne
Request (src/core/lib/requests.js)https://github.com/builtio-contentstack/contentstack-javascript/blob/master/src/core/lib/request.js
sendRequest (src/core/lib/utils.js)https://github.com/builtio-contentstack/contentstack-javascript/blob/master/src/core/lib/utils.js
contentstack-javascript-issue-5-patch-v1.diff.txthttps://github.com/builtio-contentstack/contentstack-javascript/files/1754381/contentstack-javascript-issue-5-patch-v1.diff.txt
6abdf0ahttps://github.com/contentstack/contentstack-javascript/commit/6abdf0a7aeb12bf557ae7f76d31946914b5896cd
rohitmishra209https://github.com/rohitmishra209
enhancementhttps://github.com/contentstack/contentstack-javascript/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.