httpreserve
A tool to check the status of a weblink and also see whether it is archived in the Internet Archive.
Try it out here httpreserve.info
Default Server
The library comes with a default server mode that can be configured for POST and GET requests. POST by default. Default port is :2040 but this can also be selected at runtime.
The default server can also be stood up as a web service. The API is documented below.
Client
The httpreserve client is a separate application offering a broader range of access methods. See: https://github.com/httpreserve/httpreserve-app
The client application is a work in progress. Stay tuned for more information about its capabilities.
API
Primary entry point when the server is running:
http://{httpreserve-ip-address}:{port}/httpreserve
or
http://{httpreserve-ip-address}:{port}/save
GET example:
-
Return JSON struct with information about the service you requested:
http://{httpreserve-ip-address}:{port}/httpreserve?url=http://www.google.com&filename=filename.txt
-
Manage a save request to the internet archive and return HTTPreserve struct:
http://{httpreserve-ip-address}:{port}/save?url=http://www.google.com&filename=filename.txt
POST example:
Same access point, but encode url and filename in a <i>application/x-www-form-urlencoded</i> form.
OPTIONS example:
`curl -X OPTIONS http://httpreserve.info | less`
RETURN value:
'application/json' struct to work with, e.g.
{
"FileName": "",
"AnalysisVersionNumber": "0.0.0",
"AnalysisVersionText": "exponentialDK-httpreserve/0.0.0",
"Link": "http://www.bbc.co.uk/",
"ResponseCode": 200,
"ResponseText": "OK",
"ScreenShot": "{base64 encoded data}",
"InternetArchiveLinkLatest": "http://web.archive.org/web/20170326191259/http://www0.bbc.co.uk/",
"InternetArchiveLinkEarliest": "http://web.archive.org/web/19961221203254/http://www0.bbc.co.uk/",
"InternetArchiveSaveLink": "http://web.archive.org/save/http://www.bbc.co.uk/",
"InternetArchiveResponseCode": 200,
"InternetArchiveResponseText": "OK",
"Archived": true,
"Error": false,
"ErrorMessage": "",
"StatsCreationTime": "4.506728277s"
}
Archiving Weblinks
- Find and Connect Project: Nicola Laurent on the impact of broken links.
- Binary Trees? Automatically Identifying the links between born digital records: I write about hyperlinks as a public record in own right when submitted as part of a documentary heritage.
License
GNU General Public License Version 3. Full Text