Skip to content

Commit bdfc605

Browse files
committed
fix build issues
1 parent b8a9e3e commit bdfc605

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

templates/react-native/src/client.ts.twig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ class Client {
9696
{% for header in spec.global.headers %}
9797
{{ header.key | caseLower }}: '',
9898
{% endfor %}
99+
platform: '',
99100
};
100101
headers: Headers = {
101102
'x-sdk-name': '{{ sdk.name }}',
@@ -136,6 +137,20 @@ class Client {
136137
return this;
137138
}
138139

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+
139154
{% for header in spec.global.headers %}
140155
/**
141156
* Set {{header.key | caseUcfirst}}

0 commit comments

Comments
 (0)