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:
James George
2024-08-07 09:16:27 -07:00
committed by GitHub
parent 31b691bb37
commit a8bcc75467
11 changed files with 290 additions and 32 deletions

View File

@@ -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:", () => {