-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
27 lines (26 loc) · 1.24 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!doctype html>
<html lang="en">
<head>
<title>URL Shortener Microservice</title>
<link href="https://fonts.googleapis.com/css?family=Francois+One" rel="stylesheet">
<link rel="stylesheet" href="main.css">
</head>
<body>
<div class="container">
<h1 class="header">
URL Shortener Microservice
</h1>
<p>Add <code>/new/</code> and a url as a parameter to this url, and this service will respond with a JSON object that contains the the original passed url and a shortened url.</p>
<p>When you visit the shortened url you will be redirected to the original url.</p>
<h3 class="header">Example creations</h3>
<code>https://urlm.herokuapp.com/new/https://www.google.com</code>
<code>https://urlm.herokuapp.com/new/http://foo.com:80</code>
<h3 class="header">Example creation output</h3>
<code>
{ "original_url": "http://foo.com:80", "short_url": "https://urlm.herokuapp.com/5f" }
</code>
<h3 class="header">Usage</h3>
<p><code>https://urlm.herokuapp.com/5f</code> will redirect to <code>http://foo.com:80</code></p>
</div>
</body>
</html>