0

Here is my function:

exports.onEmailVerified = functions.region('southamerica-east1').https.onRequest((req, res) => {
  return res.status(200).send('html link to redirect')
})

how can be that the response be an beautiful html to open to user ?

4
  • What's wrong with just putting the URL where your string is now? The code that calls this function will be able to find it and perform the redirect. I think you might want to edit the question to provide more data about what you're trying to accomplish, and what you've tried that isn't working the way you expect. Commented Nov 26, 2020 at 1:40
  • so i just need to put my website link and the response redirect to it automatically ? I do not want to present 'string' to user, but a beaultiful html with css, etc. Commented Nov 26, 2020 at 3:40
  • my user is just seeing a string, i do want to show him a beaultiful html, but how i pass this html for him ? or a link redirect Commented Nov 26, 2020 at 3:40
  • So you're not calling this as an API from some other code? You're sending the browser to the function's URL? Commented Nov 26, 2020 at 3:57

1 Answer 1

1

You can send an HTTP redirect like this:

res.redirect('the-url');
Sign up to request clarification or add additional context in comments.

1 Comment

that's what i was looking for

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.