From 0945bcf43572b625bea4c0432d072ad5c0608bf7 Mon Sep 17 00:00:00 2001 From: Jirka Chadima Date: Mon, 25 Jun 2018 15:31:05 +0200 Subject: [PATCH] Replaces deprecated bzzr protocol with bzz-raw --- src/swarm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swarm.js b/src/swarm.js index 5d5ae39..d1f2368 100644 --- a/src/swarm.js +++ b/src/swarm.js @@ -56,7 +56,7 @@ module.exports = ({ // String -> String -> String const rawUrl = swarmUrl => hash => - `${swarmUrl}/bzzr:/${hash}` + `${swarmUrl}/bzz-raw:/${hash}` // String -> String -> Promise Uint8Array // Gets the raw contents of a Swarm hash address. @@ -154,7 +154,7 @@ module.exports = ({ // Uploads raw data to Swarm. // Returns a promise with the uploaded hash. const uploadData = swarmUrl => data => - request(`${swarmUrl}/bzzr:/`, { + request(`${swarmUrl}/bzz-raw:/`, { body: typeof data === "string" ? fromString(data) : data, method: "POST"});