Skip to content
Digital Preservation of HTTP in documentary heritage.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src [feature] logo. May 19, 2017
.travis.yml [testing] Requires slightly newer golang. Apr 25, 2017
404.go [feature] 404 and version. May 7, 2017
ICON-LICENSE [documentation] LICENSE for our open-iconic bits. Mar 25, 2017
LICENSE
README.md
defaultserver.go [feature] 404 and version. May 7, 2017
defaultserverpages.go [ignore] text formatting. May 7, 2017
errors.go
httphandler.go [feature] url shorteners. #14 Sep 4, 2017
httpreserve.go
httpreserve_test.go [testing] tests. Apr 23, 2017
httpreservehandler.go
httpreservestructs.go
linkstathandler.go [feature] Say hello to phantomjs. Fixes #10. May 7, 2017
optionshandler.go
version.go [feature] Enables saving of url shortening links. #14. Sep 4, 2017

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.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.