https://github.com/scbd/serverless-is-url
service to test for valid and live url
https://github.com/scbd/serverless-is-url
Last synced: 2 months ago
JSON representation
service to test for valid and live url
- Host: GitHub
- URL: https://github.com/scbd/serverless-is-url
- Owner: scbd
- License: mit
- Created: 2020-03-20T15:54:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-20T16:09:49.000Z (over 6 years ago)
- Last Synced: 2025-03-12T08:33:38.720Z (over 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


IS-URL Service
test a url if valid and live returning true or false
```js
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
}
```