Skip to content

API docs are misleading #8

@00dani

Description

@00dani

Currently the API is "documented" like this:

POST /sketchify
{
    'long_url': 'twitter.com'
}

It's very vague, but it appears to be saying you can POST a JSON object like {"long_url": "twitter.com"} to verylegit.link/sketchify to get it turned suspicious. You can't, because that endpoint only accepts requests in application/x-www-form-urlencoded format.

I recommend the docs are updated to clarify this, ideally including an example request/response pair:

POST /sketchify HTTP/1.1
Content-Length: 20
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Host: verylegit.link

long_url=twitter.com
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8

http://win2003.verylegit.link/CT*OMGb=B5+b+)u6)DU882bitcoin.xlsx.pdf

As well as example commands for cURL and HTTPie, like this:

$ curl verylegit.link/sketchify -d long_url=twitter.com
$ http -f verylegit.link/sketchify long_url=twitter.com

(They look identical in this case but HTTPie is seriously way better.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions