Skip to content

scbd/serverless-is-url

Repository files navigation

Secretariat of the Convention on Biological DiversitySecretariat of the Convention on Biological Diversity

IS-URL Service

test a url if valid and live returning true or false

export const testUri = async(url) => {
  const service  = 'https://injo3jyxlb.execute-api.us-east-1.amazonaws.com/stg/test'
  const headers  = { headers: { Authorization: `Bearer ${process.env.TOKEN}` } }
  const body     = { url }

  const { data } = await axios.post(service, body, headers)

  return data // true || false
}

About

service to test for valid and live url

Resources

License

Stars

0 stars

Watchers

6 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors