overleaf/services/spelling/test/acceptance/js/helpers/request.js
Jakob Ackermann a540754f6e Merge pull request #18116 from overleaf/jpa-bulk-replace-localhost
[misc] bulk replace localhost with 127.0.0.1

GitOrigin-RevId: d238f3635302e8ff5500d611108c4d1bef216726
2024-04-26 08:04:39 +00:00

18 lines
441 B
JavaScript

import { promisify } from 'util'
import Request from 'request'
export const PORT = 3005
const BASE_URL = `http://${process.env.HTTP_TEST_HOST || '127.0.0.1'}:${PORT}`
const request = Request.defaults({
baseUrl: BASE_URL,
headers: {
'Content-Type': 'application/json',
},
followRedirect: false,
})
export const get = promisify(request.get)
export const post = promisify(request.post)
export const del = promisify(request.del)