You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feat: Expose a way to pass in custom fetch (@W-21293162@) (#272)
* expose a way to pass in custom fetch via client config
* update changelog
update docs
lint
Copy file name to clipboardExpand all lines: CHANGELOG.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,32 @@
1
1
# CHANGELOG
2
2
3
+
## v5.1.0
4
+
5
+
### API Versions
6
+
7
+
| API Name | API Version |
8
+
|----------|-------------|
9
+
| shopper-login | 1.46.0 |
10
+
| shopper-baskets | 1.11.0 |
11
+
| shopper-baskets | 2.5.1 |
12
+
| shopper-configurations | 1.2.0 |
13
+
| shopper-consents | 1.1.4 |
14
+
| shopper-context | 1.1.3 |
15
+
| shopper-customers | 1.6.1 |
16
+
| shopper-experience | 1.2.1 |
17
+
| shopper-gift-certificates | 1.2.0 |
18
+
| shopper-orders | 1.12.1 |
19
+
| shopper-payments | 1.4.0 |
20
+
| shopper-products | 1.3.0 |
21
+
| shopper-promotions | 1.2.0 |
22
+
| shopper-search | 1.8.0 |
23
+
| shopper-seo | 1.0.17 |
24
+
| shopper-stores | 1.2.0 |
25
+
26
+
### Enchancements
27
+
28
+
- Allow developers to pass in custom fetch implementation via `clientConfig`[#272](https://github.com/SalesforceCommerceCloud/commerce-sdk-isomorphic/pull/272)
For more documentation about this helper function, please refer to the [commerce-sdk-isomorphic docs](https://salesforcecommercecloud.github.io/commerce-sdk-isomorphic/modules/helpers.html).
225
225
226
+
#### Custom Fetch function
227
+
228
+
You can provide your own custom fetch function to intercept, log, or modify all SDK requests. This is useful for:
229
+
-**Request/Response Logging**: Track all API calls for debugging and monitoring
The SDK currently single encodes special characters for query parameters inUTF-8 format based on SCAPIguidelines. However, the SDK does NOT encode path parameters, and will require the developer to encode any path parameters with special characters.
<p>Implementation of <ahref="../interfaces/clientconfig.clientconfiginit.html">ClientConfigInit</a>.<ahref="../interfaces/clientconfig.clientconfiginit.html#baseuri">baseUri</a></p>
<p>Implementation of <ahref="../interfaces/clientconfig.clientconfiginit.html">ClientConfigInit</a>.<ahref="../interfaces/clientconfig.clientconfiginit.html#fetch">fetch</a></p>
178
+
<ul>
179
+
<li>Defined in src/lib/clientConfig.ts:62</li>
168
180
</ul>
169
181
</aside>
170
182
</section>
@@ -175,7 +187,7 @@ <h3>fetch<wbr>Options</h3>
175
187
<asideclass="tsd-sources">
176
188
<p>Implementation of <ahref="../interfaces/clientconfig.clientconfiginit.html">ClientConfigInit</a>.<ahref="../interfaces/clientconfig.clientconfiginit.html#fetchoptions">fetchOptions</a></p>
177
189
<ul>
178
-
<li>Defined in src/lib/clientConfig.ts:56</li>
190
+
<li>Defined in src/lib/clientConfig.ts:60</li>
179
191
</ul>
180
192
</aside>
181
193
</section>
@@ -186,7 +198,7 @@ <h3>headers</h3>
186
198
<asideclass="tsd-sources">
187
199
<p>Implementation of <ahref="../interfaces/clientconfig.clientconfiginit.html">ClientConfigInit</a>.<ahref="../interfaces/clientconfig.clientconfiginit.html#headers">headers</a></p>
188
200
<ul>
189
-
<li>Defined in src/lib/clientConfig.ts:52</li>
201
+
<li>Defined in src/lib/clientConfig.ts:56</li>
190
202
</ul>
191
203
</aside>
192
204
<divclass="tsd-type-declaration">
@@ -205,7 +217,7 @@ <h3>parameters</h3>
205
217
<asideclass="tsd-sources">
206
218
<p>Implementation of <ahref="../interfaces/clientconfig.clientconfiginit.html">ClientConfigInit</a>.<ahref="../interfaces/clientconfig.clientconfiginit.html#parameters">parameters</a></p>
<p>Implementation of <ahref="../interfaces/clientconfig.clientconfiginit.html">ClientConfigInit</a>.<ahref="../interfaces/clientconfig.clientconfiginit.html#proxy">proxy</a></p>
<p>Implementation of <ahref="../interfaces/clientconfig.clientconfiginit.html">ClientConfigInit</a>.<ahref="../interfaces/clientconfig.clientconfiginit.html#throwonbadresponse">throwOnBadResponse</a></p>
<p>Implementation of <ahref="../interfaces/clientconfig.clientconfiginit.html">ClientConfigInit</a>.<ahref="../interfaces/clientconfig.clientconfiginit.html#transformrequest">transformRequest</a></p>
0 commit comments