@@ -544,20 +544,20 @@ public byte[] get(Cid cid) throws IOException {
544
544
}
545
545
546
546
public MerkleNode put (byte [] object ) throws IOException {
547
- return put ("json" , object , "cbor" );
547
+ return put ("dag- json" , object , "dag- cbor" );
548
548
}
549
549
550
550
public MerkleNode put (String inputFormat , byte [] object ) throws IOException {
551
- return put (inputFormat , object , "cbor" );
551
+ return put (inputFormat , object , "dag- cbor" );
552
552
}
553
553
554
554
public MerkleNode put (byte [] object , String outputFormat ) throws IOException {
555
- return put ("json" , object , outputFormat );
555
+ return put ("dag- json" , object , outputFormat );
556
556
}
557
557
558
558
public MerkleNode put (String inputFormat , byte [] object , String outputFormat ) throws IOException {
559
559
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" );
561
561
m .addFilePart ("file" , Paths .get ("" ), new NamedStreamable .ByteArrayWrapper (object ));
562
562
String res = m .finish ();
563
563
return MerkleNode .fromJSON (JSONParser .parse (res ));
0 commit comments