Skip to content

Commit 576f8e6

Browse files
fix: guess correct filetype from vnd.api+json style content-type
fix #382
1 parent a52b83b commit 576f8e6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lua/rest-nvim/ui/result.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ local panes = {
7878
local body_meta = {}
7979
if content_type then
8080
local base_type, res_type = content_type[1]:match("(.*)/([^;]+)")
81+
-- HACK: handle application/vnd.api+json style content types
82+
res_type = res_type:match(".+%+(.*)") or res_type
8183
if base_type == "image" then
8284
body = { "Binary(image) answer" }
8385
elseif res_type == "octet_stream" then

0 commit comments

Comments
 (0)