When I send post request and track http,I saw that my “apikey” parameter in headers returns “Apikey” .Because of this I m taking 401 unauthorized. How to solve this problem?
export function CreateEmptyWareHouse(data){
let emptyWareHouseSeedHeader = {
headers: {
"Authorization": `Bearer ${data.access_token}`,
"accept": "*/*",
"Content-Type":"application/json",
"apikey":"****"
},
};
describe('EmptyWareHouseSeed çalıştırır', (t) => {
let emptyWareHouseSeedRes = http.post("https://test/dev/v1/Main/Test?test=EmptyWarehouse&operation=Classic&recreateDb=true", JSON.stringify({}), emptyWareHouseSeedHeader)
t.expect(emptyWareHouseSeedRes.status).toEqual(204);
sleep(10)
});
}