-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
56 lines (54 loc) · 2 KB
/
index.html
File metadata and controls
56 lines (54 loc) · 2 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<html>
<head>
<title>URL Shortener Microservice</title>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<script></script>
<style type = 'text/css'>
body {
font-family: 'Roboto', sans-serif;
padding-top: 50px;
padding-left: 20px;
}
span {
text-align: center;
}
</style>
</head>
<body id = 'format'>
<div>
<h1>API Basejump: URL Shortener Microservice</h1>
<h3> User stories: </h3>
1) I can pass a URL as a parameter and I will receive a shortened URL in the JSON response.
</br>
2) If I pass an invalid URL that doesn't follow the valid http://www.example.com format, the JSON response will contain an error instead.
</br>
3) When I visit that shortened URL, it will redirect me to my original link.
</br>
<!-- Update example usage! -->
<h3>Example usage:</h3>
<p><mark>
https://cfurl.herokuapp.com/http://www.google.com
</br>
https://cfurl.herokuapp.com/http://www.espn.com
</mark></p>
<h3>Example output:</h3>
<p><mark>
{"original_URL":"http://www.google.com","short_url":"https://cfurl.herokuapp.com/507"}
</br>
{"original_URL":"http://www.espn.com","short_url":"https://cfurl.herokuapp.com//951"}
</mark></p>
<h3>Usage:</h3>
<p><mark>
https://cfurl.herokuapp.com/507
</mark></p>
<h3>Will Redirect To:</h3>
<p><mark>
http://www.google.com
</mark></p>
</div>
<span>
<p> Written and coded by <a href="https://www.freecodecamp.com/codefay">CodeFay</a>
</p>
</span>
</body>
</html>