supertest-graphql icon indicating copy to clipboard operation
supertest-graphql copied to clipboard

How to get headers value ?

Open giovannimanzoni opened this issue 3 years ago • 0 comments

Hi, with supertest I can read headers from res.headers with this code


const supertest = require("supertest");
const request = supertest(process.env.URL);

request
        .post(endpoint_public)
        .send({
          query: qGetJwt,
        })
        .expect(200)
        .end((err: any, res: any) => {
          expect(res.body).to.not.have.property("errors");

          getJWTData = res.body.data.getJWT;
          getJWTHeaders = res.headers;
          done();
        });

How can I read headers with your package ?

Thanks.

giovannimanzoni avatar Jul 07 '22 15:07 giovannimanzoni