https://cypress.io logo
how would you add file as parameter to a HTTP requ...
# general-chat
m
how would you add file as parameter to a HTTP request? I'm getting error 422
Copy code
it("create a deployment", () => {

  const param = String.toString(cy.readFile('deployment.yaml'))

    cy.request({
      method: 'POST',
      url: createDeployment,
      headers: {
        Authorization: 'Bearer ' + TOKEN
      },
      body: {
        param
      }
    })
  })