mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-25 01:09:52 -06:00
17 lines
301 B
TypeScript
17 lines
301 B
TypeScript
const rp = require('@cypress/request-promise')
|
|
const { fs } = require('../util/fs')
|
|
|
|
export = {
|
|
send (pathToFile: string, url: string) {
|
|
return fs
|
|
.readFileAsync(pathToFile)
|
|
.then((buf) => {
|
|
return rp({
|
|
url,
|
|
method: 'PUT',
|
|
body: buf,
|
|
})
|
|
})
|
|
},
|
|
}
|