diff --git a/autoload/codeium/command.vim b/autoload/codeium/command.vim index 9a90173c..e7350287 100644 --- a/autoload/codeium/command.vim +++ b/autoload/codeium/command.vim @@ -91,7 +91,7 @@ function! s:commands.Auth(...) abort endif while empty(api_key) && tries < 3 - let command = 'curl -sS ' . register_user_url . ' ' . + let command = 'curl -sSL ' . register_user_url . ' ' . \ '--header "Content-Type: application/json" ' . \ '--data ' . shellescape(json_encode({'firebase_id_token': auth_token})) let response = system(command) @@ -104,7 +104,7 @@ function! s:commands.Auth(...) abort \ . 'Would you like to try auth without checking SSL certificate revocation? (y/n): ') call inputrestore() if useNoSsl ==? 'y' - let command = 'curl --ssl-no-revoke -sS ' . register_user_url . ' ' . + let command = 'curl --ssl-no-revoke -sSL ' . register_user_url . ' ' . \ '--header "Content-Type: application/json" ' . \ '--data ' . shellescape(json_encode({'firebase_id_token': auth_token})) let response = system(command) diff --git a/autoload/codeium/server.vim b/autoload/codeium/server.vim index 2ae6be2b..49e88108 100644 --- a/autoload/codeium/server.vim +++ b/autoload/codeium/server.vim @@ -73,7 +73,7 @@ function! codeium#server#Request(type, data, ...) abort \ '/exa.language_server_pb.LanguageServerService/' . a:type let data = json_encode(a:data) let args = [ - \ 'curl', uri, + \ 'curl', '-L', uri, \ '--header', 'Content-Type: application/json', \ '-d@-' \ ] @@ -188,7 +188,7 @@ function! codeium#server#Start(...) abort let config = get(g:, 'codeium_server_config', {}) if has_key(config, 'portal_url') && !empty(config.portal_url) - let response = system('curl -s ' . config.portal_url . '/api/version') + let response = system('curl -sL ' . config.portal_url . '/api/version') if v:shell_error == '0' let s:language_server_version = response let s:language_server_sha = 'enterprise-' . s:language_server_version