@@ -544,20 +544,20 @@ public byte[] get(Cid cid) throws IOException {
544544 }
545545
546546 public MerkleNode put (byte [] object ) throws IOException {
547- return put ("json" , object , "cbor" );
547+ return put ("dag- json" , object , "dag- cbor" );
548548 }
549549
550550 public MerkleNode put (String inputFormat , byte [] object ) throws IOException {
551- return put (inputFormat , object , "cbor" );
551+ return put (inputFormat , object , "dag- cbor" );
552552 }
553553
554554 public MerkleNode put (byte [] object , String outputFormat ) throws IOException {
555- return put ("json" , object , outputFormat );
555+ return put ("dag- json" , object , outputFormat );
556556 }
557557
558558 public MerkleNode put (String inputFormat , byte [] object , String outputFormat ) throws IOException {
559559 String prefix = protocol + "://" + host + ":" + port + version ;
560- Multipart m = new Multipart (prefix + "dag/put/?stream-channels=true&input-enc =" + inputFormat + "&f =" + outputFormat , "UTF-8" );
560+ Multipart m = new Multipart (prefix + "dag/put/?stream-channels=true&input-codec =" + inputFormat + "&store-codec =" + outputFormat , "UTF-8" );
561561 m .addFilePart ("file" , Paths .get ("" ), new NamedStreamable .ByteArrayWrapper (object ));
562562 String res = m .finish ();
563563 return MerkleNode .fromJSON (JSONParser .parse (res ));
0 commit comments