Example call using Javascript
async function getResponse() {
const baseUrl = 'https://readable-regex-8d81b79167bf.herokuapp.com/api/'
const inputString = "1+323_%8&3a"
const encodedInputString = encodeURIComponent(inputString)
try {
const response = await fetch(baseUrl + endpoint + "?inputString=" + encodedInputString)
const json = await response.json()
const transformedString = json.result
}
catch(exception) {
throw exception
}
}
GET https://readable-regex-8d81b79167bf.herokuapp.com/api/{endpoint}?inputString={encodedInputString}
Endpoints:
onlyNumbers
onlyLetters
onlySpecialCharacters
isEmailAddress
isPhoneNumber
Params:
inputString: string
example: "1+323_%8&3a"
Response:
{
result: string
}
Result is the transformed string
example for onlyLetters:
{
result: 'a'
}