@notifi-network/fusion-sdk 0.0.10-alpha.4 → 0.0.10-alpha.6

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.
@@ -30,8 +30,24 @@ export class FetchProxyWrapper {
30
30
  async fetch(url, headers, httpMethod, bodyJson, region) {
31
31
  if (!this.isProxyEnabled) {
32
32
  // Use built in fetch()
33
+ const getHttpMethodString = (httpMethod) => {
34
+ switch (httpMethod) {
35
+ case HttpMethod.HTTP_METHOD_GET:
36
+ return "GET";
37
+ case HttpMethod.HTTP_METHOD_POST:
38
+ return "POST";
39
+ case HttpMethod.HTTP_METHOD_PUT:
40
+ return "PUT";
41
+ case HttpMethod.HTTP_METHOD_DELETE:
42
+ return "DELETE";
43
+ case HttpMethod.HTTP_METHOD_HEAD:
44
+ return "HEAD";
45
+ default:
46
+ throw new Error(`Unsupported HTTP method: ${httpMethod}`);
47
+ }
48
+ };
33
49
  const fetchOptions = {
34
- method: HttpMethod[httpMethod],
50
+ method: getHttpMethodString(httpMethod),
35
51
  headers: new Headers(headers),
36
52
  };
37
53
  if (bodyJson) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notifi-network/fusion-sdk",
3
- "version": "0.0.10-alpha.4",
3
+ "version": "0.0.10-alpha.6",
4
4
  "description": "SDK utils for Notifi Fusion parser development. This includes types and helpers for accessing ephemeral/persistent storage, RPCs for different chains, and other utilities.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",