fix: ensure Content-Type header priority in the CLI (#4242)
- Ensure the `Content-Type` header takes priority over the value set in the request body. - Introduces `HoppRESTRequest` schema `v6` with `text/xml` added under the supported content types.
This commit is contained in:
@@ -149,6 +149,16 @@ describe("hopp test [options] <file_path_or_id>", () => {
|
||||
|
||||
expect(error).toBeNull();
|
||||
});
|
||||
|
||||
test("The `Content-Type` header takes priority over the value set at the request body", async () => {
|
||||
const args = `test ${getTestJsonFilePath(
|
||||
"content-type-header-scenarios.json",
|
||||
"collection"
|
||||
)}`;
|
||||
const { error } = await runCLI(args);
|
||||
|
||||
expect(error).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("Test `hopp test <file_path_or_id> --env <file_path_or_id>` command:", () => {
|
||||
|
||||
Reference in New Issue
Block a user