"src/axios/src/axios/requestHeadersHelper.js" did not exist on "ccda68dc8c6a383ff8f9a4a041d2f2f4ee63baa5"
requestHeadersHelper.js 837 Bytes
Newer Older
1 2
import { AGENT } from '@/utils/constants'

Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
3
export function requestData (filters) {
4
  return {
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
5
    params: filters,
6
    headers: {
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
7
      // Authorization: 'Bearer ' + decrypt(localStorage.getItem('tkn')),
8 9 10 11 12 13 14 15 16
      'Content-Type': 'application/json',
      Accept: 'application/json',
    },
    httpsAgent: {
      AGENT,
    },
  }
}

Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
17
export function requestDataFormUrlEncoded (filters) {
18
  return {
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
19
    params: filters,
20
    headers: {
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
21
      // Authorization: 'Bearer ' + decrypt(localStorage.getItem('tkn')),
Yoelvis Gonzalez's avatar
Yoelvis Gonzalez committed
22
      'Content-Type': 'application/json',
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
      Accept: 'application/json',
    },
    httpsAgent: {
      AGENT,
    },
  }
}

export function requestDataMultipartForm () {
  return {
    headers: {
      'Content-Type': 'multipart/form-data',
      Accept: 'application/json',
    },
    httpsAgent: {
      AGENT,
    },
  }
}