We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8a9e3e commit bdfc605Copy full SHA for bdfc605
templates/react-native/src/client.ts.twig
@@ -96,6 +96,7 @@ class Client {
96
{% for header in spec.global.headers %}
97
{{ header.key | caseLower }}: '',
98
{% endfor %}
99
+ platform: '',
100
};
101
headers: Headers = {
102
'x-sdk-name': '{{ sdk.name }}',
@@ -136,6 +137,20 @@ class Client {
136
137
return this;
138
}
139
140
+ /**
141
+ * Set platform
142
+ *
143
+ * Set platform. Will be used as origin for all requests.
144
145
+ * @param {string} platform
146
+ * @returns {this}
147
+ */
148
+ setPlatform(platform: string): this {
149
+ this.config.platform = platform;
150
+
151
+ return this;
152
+ }
153
154
155
/**
156
* Set {{header.key | caseUcfirst}}
0 commit comments