Giter VIP home page Giter VIP logo

Comments (7)

Pradumnasaraf avatar Pradumnasaraf commented on August 22, 2024 5

Hey,

Sorry for the late reply. Wow really love your point @Nabhag8848. Agree and +1 with the @schmelto opinion.

from biodrop-cli.

Nabhag8848 avatar Nabhag8848 commented on August 22, 2024 1

Hey @Pradumnasaraf @schmelto, My name is Nabhag. The above validation looks good, but i think we can have one more validation, which will make sure that the input link points to the user profile and the account exist. so lets take an example of github, to look at user profile we have https://github.com/:username. Now GET request to URL would either response with status code 200 OK if the user exist and the user have mention the username correctly else will response with 404 not found if user not exist or the user have input the wrong username. attaching below example in console for better understanding.

Screenshot from 2022-11-08 11-38-05

Now using the same analogy, i have tried using leetcode and this seems to work for the same and seems like would work for all the input urls.

Screenshot from 2022-11-08 11-39-31

conclusion

we can avoid different platform apis to check if the user exist. By making the GET request to the input url. we can let know the user if the input url leads to the correct user profile page if the response status code is 200 OK else let know the user that input url is wrong or the username doesn't exist.

from biodrop-cli.

schmelto avatar schmelto commented on August 22, 2024 1

What y'all think about the same? I have some questions too.

Question

  • making GET request to the website url is expensive?
  • will that lead to bad user experience?

That is a great question.
In my opinion we can negligible the response time of the api call due the benefit outweigh the cost.

from biodrop-cli.

github-actions avatar github-actions commented on August 22, 2024

Hey! contributor, thank you for opening an Issue 🎉.

Soon one of our maintainers will review it and provide you with feedback/suggestions. If you think it's something urgent, feel free to reach out Pradumna Saraf on Twitter. Star ⭐ this repo to show us support.

Happy, Open Source!

from biodrop-cli.

Pradumnasaraf avatar Pradumnasaraf commented on August 22, 2024

Thank you for opening the issue @schmelto

from biodrop-cli.

Nabhag8848 avatar Nabhag8848 commented on August 22, 2024

What y'all think about the same? I have some questions too.

Question

  • making GET request to the website url is expensive?
  • will that lead to bad user experience?

from biodrop-cli.

Pradumnasaraf avatar Pradumnasaraf commented on August 22, 2024

Closing this issue for now. Thanks for opening

from biodrop-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.