Skip to content

Commit 98499c1

Browse files
authored
Merge pull request #900 from evoskuil/master
Default to format-json.
2 parents c820a7a + f732c11 commit 98499c1

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/parse/query.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ bool parse_query(rpc::request_t& out, const request& request) NOEXCEPT
5757

5858
const auto accepts = to_media_types((request)[field::accept]);
5959

60-
if (contains(accepts, json) || format == "json")
61-
{
62-
params["media"] = to_value(json);
63-
return true;
64-
}
65-
6660
if (contains(accepts, text) || format == "text")
6761
{
6862
params["media"] = to_value(text);
@@ -75,7 +69,15 @@ bool parse_query(rpc::request_t& out, const request& request) NOEXCEPT
7569
return true;
7670
}
7771

78-
return false;
72+
////if (contains(accepts, json) || format == "json")
73+
////{
74+
//// params["media"] = to_value(json);
75+
//// return true;
76+
////}
77+
78+
// Default to json.
79+
params["media"] = to_value(json);
80+
return true;
7981
}
8082

8183
} // namespace node

0 commit comments

Comments
 (0)