Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rest api does not tell if page does not exists (404) #29

Closed
Salmela opened this issue Dec 4, 2019 · 1 comment
Closed

Rest api does not tell if page does not exists (404) #29

Salmela opened this issue Dec 4, 2019 · 1 comment

Comments

@Salmela
Copy link

Salmela commented Dec 4, 2019

Bug Report

Current Behavior

Currently there is no way to detect if the link target returns non-successful HTTP status code (like 404, 401, etc.) These responses do have status: "success" which is bit misleading.

Expected behavior/code

I expect that there is some field that tells what the exact http status code was.

Additional context/Screenshots

404 page's response: https://api.microlink.io/?url=https%3A%2F%2Fwww.google.com/wufhiwef
200 page's response: https://api.microlink.io/?url=https%3A%2F%2Fwww.google.com/
This is related to #28

@Kikobeats
Copy link
Member

It's expected behavior. The service gives you data, even the URL doesn't exist 🙂.

If you don't want to resolve 4xx URLs, just don't send them to the service.

You can perform a simple HTTP HEAD/GET before call the service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants