Metric-Imperial Converter on Glitch

Hello,

Tried what you said but no luck.
Please take a look at my code

Hello!

In your case there are discrepancies between what’s returned from your app (https://luxuriant-noble-ton.glitch.me/) and what your API returns.

When you use 1//2min on your app (through the form), you return the expected message, whereas when you request something from the API directly (GET https://luxuriant-noble-ton.glitch.me/api/convert?input=1//2min) the response is invalid unit.


1 Like

Hello there,

I think I remember seeing something similar to this, where the issue is Glitch. Specifically, Glitch handles the parsing of HTTP strings differently to what is expected. The solution, in the previous case was to import the code into Replit (or similar)

Hope this helps

3 Likes

It worked on Replit. Thank you!

2 Likes

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