Back End Development and APIs Projects - URL Shortener Microservice

Tell us what’s happening:
I am gestting Cannot POST /api/shorturl

Your project link(s)
https://boilerplate-project-urlshortener.kritostar.repl.co/
solution: boilerplate-project-urlshortener - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Challenge: Back End Development and APIs Projects - URL Shortener Microservice

Link to the challenge:

I have just corrected the code, and the redirect and find is working but the challenge is showing me X

Yeap, I dont know how to save and show the saved one :S

yes but if its a new one, I am saving and that’s it, I am not showing it

Sorry to keep on bothering you. My code is now working, but the tests are not passing. Can you see maybe why? Thanks a lot

You modified the index.html file and changed the name attribute from url to input_url. The tests are expecting to post using a name of url, so if you change it back, then you will pass the first 3 tests.

The last test is failing because the tests are not expecting to receive a 401 status. Just return the required JSON object without changing the status and you will pass it.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.