URL Shortener Microservice test does not trigger my page

Tell us what’s happening:

I’m using Replit to build my Microservice and I got it so far, that I believe all tests should work, but when I enter the URL to my project and start the tests, it doesn’t trigger any of my functions. (I’ve added console-logs to check for that)

The problem might be, that I misunderstood the endpoints, that I’m expected to use.
I used: <project-link>/api/shorturl/new/<URL>
and: <project-link>/api/shorturl/<shortID>

I also tried: <project-link>/new<URL>
though and it didn’t work either.

When I try reaching the page myself it works perfectly well either way.

Your project link(s)

solution: https://urlshortener-project.tomwierbrgge.repl.co

Your browser information:

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

Challenge: URL Shortener Microservice

Link to the challenge:

Welcome there,

This is the problem because it is a POST request. Not a GET request.

You can POST a URL to /api/shorturl/new

Otherwise, please provide a link to your project code, and we can look further.

Hope this helps

1 Like

Thank you for the quick answer!
I’ll check that.

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