Hyperlinks finder is a simple Web link scraper.
The Java-based REST service provide just one end-point, /links.
The end-point takes as input a single HTTP url and find all the hyper links (anchors) present on the page identified by the input url. The url should be encode
Hyperlinks finder use Jersey as JAX-RS layer provider and Grizzly as HTTP server
This project assume you have Apache Maven and Java installed in your system.
To start the server, run:
mvn compile exec:java
The /links end-point is expecting an encode URL as parameter, like:
curl http://localhost:8080/links/http%3A%2F%2Flocalhost:8080%2Fstatic-content%2Fexample-with-one-link
The previous example is completely functional. After executing the previous call you should get a response like:
[
"<a href="http://www.example.com"></a>"
]
To run the tests, execute:
mvn clean test