I'm trying to send a get request with a body using playwright. I did not find any resource / way how to do it. I would like to query the elasticsearch using get request with payload. example:
test("Get simki", async ({request})=> {
const response = await request.get('http://test,test.be/es/ad_matrix_agg_*/_search', {
headers:{
'Authorization': 'Basic token',
'Content-Type': 'application/json'
},
});
console.log(await response.json());
expect(response.status()).toBe(200);
})
there is no option to add data in get request like in post request.
will appreciate any assistance on this matter.
trying to use data in get request did not work and got this: