fix: legacy warning (#2120)
This commit is contained in:
@@ -596,20 +596,10 @@ function M.curl(opts)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
if Config[Config.provider] == nil and provider.parse_stream_data ~= nil then
|
if provider.parse_stream_data ~= nil then
|
||||||
if provider.parse_response ~= nil then
|
|
||||||
Utils.warn(
|
|
||||||
"parse_stream_data and parse_response are mutually exclusive, and thus parse_response will be ignored. Make sure that you handle the incoming data correctly.",
|
|
||||||
{ once = true }
|
|
||||||
)
|
|
||||||
end
|
|
||||||
provider:parse_stream_data(resp_ctx, data, handler_opts)
|
provider:parse_stream_data(resp_ctx, data, handler_opts)
|
||||||
else
|
else
|
||||||
if provider.parse_stream_data ~= nil then
|
parse_stream_data(data)
|
||||||
provider:parse_stream_data(resp_ctx, data, handler_opts)
|
|
||||||
else
|
|
||||||
parse_stream_data(data)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user