Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added Client#https?(filename)

  • Loading branch information...
commit bd26dfc849849cd4343c3989dd78204d5ea60c36 1 parent 8ad65e1
@tj tj authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 lib/knox/client.js
View
15 lib/knox/client.js
@@ -302,7 +302,20 @@ Client.prototype.deleteFile = function(filename, headers, fn){
* @api public
*/
-Client.prototype.url = function(filename){
+Client.prototype.url =
+Client.prototype.http = function(filename){
+ return 'http://' + join(this.endpoint, filename);
+};
+
+/**
+ * Return an HTTPS url to the given `filename`.
+ *
+ * @param {String} filename
+ * @return {String}
+ * @api public
+ */
+
+Client.prototype.https = function(filename){
return 'http://' + join(this.endpoint, filename);
};
Please sign in to comment.
Something went wrong with that request. Please try again.