@@ -63,7 +63,7 @@ export const urlsession: Client<UrlsessionOptions> = {
6363
6464 case 'application/json' :
6565 if ( postData . jsonObj ) {
66- push ( `${ literalDeclaration ( 'parameters' , postData . jsonObj , opts ) } as [String : Any]` ) ;
66+ push ( `${ literalDeclaration ( 'parameters' , postData . jsonObj , opts ) } as [String : Any? ]` ) ;
6767 blank ( ) ;
6868 push ( 'let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])' ) ;
6969 blank ( ) ;
@@ -87,7 +87,7 @@ export const urlsession: Client<UrlsessionOptions> = {
8787 push ( 'body += "--\\(boundary)\\r\\n"' , 1 ) ;
8888 push ( 'body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""' , 1 ) ;
8989 push ( 'if let filename = param["fileName"] {' , 1 ) ;
90- push ( 'let contentType = param["content-type "]!' , 2 ) ;
90+ push ( 'let contentType = param["contentType "]!' , 2 ) ;
9191 push ( 'let fileContent = try String(contentsOfFile: filename, encoding: .utf8)' , 2 ) ;
9292 push ( 'body += "; filename=\\"\\(filename)\\"\\r\\n"' , 2 ) ;
9393 push ( 'body += "Content-Type: \\(contentType)\\r\\n\\r\\n"' , 2 ) ;
@@ -150,7 +150,7 @@ export const urlsession: Client<UrlsessionOptions> = {
150150
151151 blank ( ) ;
152152
153- push ( 'let (data, response ) = try await URLSession.shared.data(for: request)' ) ;
153+ push ( 'let (data, _ ) = try await URLSession.shared.data(for: request)' ) ;
154154 push ( 'print(String(decoding: data, as: UTF8.self))' ) ;
155155
156156 return join ( ) ;
0 commit comments