Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit a024a9c

Browse files
SynapticloopSynapticloop
authored andcommitted
change addHeader to addParameter
1 parent 0006969 commit a024a9c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/synapticloop/b2/request/B2DownloadFileByIdRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import org.apache.http.HttpHeaders;
2020
import org.apache.http.impl.client.CloseableHttpClient;
21+
2122
import synapticloop.b2.exception.B2ApiException;
2223
import synapticloop.b2.response.B2AuthorizeAccountResponse;
2324
import synapticloop.b2.response.B2DownloadFileResponse;
@@ -91,7 +92,7 @@ public B2DownloadFileByIdRequest(CloseableHttpClient client, B2AuthorizeAccountR
9192
String fileId, long rangeStart, long rangeEnd) {
9293

9394
super(client, b2AuthorizeAccountResponse, b2AuthorizeAccountResponse.getDownloadUrl() + B2_DOWNLOAD_FILE_BY_ID);
94-
this.addHeader(B2RequestProperties.KEY_FILE_ID, fileId);
95+
this.addParameter(B2RequestProperties.KEY_FILE_ID, fileId);
9596
if (rangeStart > -1) {
9697
if (rangeEnd > -1) {
9798
this.addHeader(HttpHeaders.RANGE, String.format("bytes=%d-%d", rangeStart, rangeEnd));

src/test/java/synapticloop/b2/request/B2DownloadFileRequestTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package synapticloop.b2.request;
2+
23
import static org.junit.Assert.*;
34

45
import java.io.File;

0 commit comments

Comments
 (0)