Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

httpreserve

Build Status GoDoc Go Report Card

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:

POST example:

Same access point, but encode url and filename in a <i>application/x-www-form-urlencoded</i> form.

INFO example:

TODO: Add some information to INFO response

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

License

GNU General Public License Version 3. Full Text

You can’t perform that action at this time.