File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
kotlin/src/main/kotlin/io/appwrite/services Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -149,9 +149,8 @@ namespace {{ spec.title | caseUcfirst }}
149149 new HttpMethod(method),
150150 _endpoint + path + queryString);
151151
152- if ("multipart/form-data".Equals(
153- headers["content-type"],
154- StringComparison.OrdinalIgnoreCase))
152+ if (headers.TryGetValue("content-type", out var contentType) &&
153+ "multipart/form-data".Equals(contentType, StringComparison.OrdinalIgnoreCase))
155154 {
156155 var form = new MultipartFormDataContent();
157156
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class {{ service.name | caseUcfirst }}(client: Client) : Service(client) {
5555 "{{ parameter .name }}" to {{ parameter .name | caseCamel }},
5656 {%~ endfor %}
5757 )
58- val apiHeaders = mutableMapOf(
58+ val apiHeaders = mutableMapOf< String , String > (
5959 {%~ for key , header in method .headers %}
6060 "{{ key }}" to "{{ header }}",
6161 {%~ endfor %}
You can’t perform that action at this time.
0 commit comments