Skip to content

Commit

Permalink
Rename http_request_stream_callback to keep API backward compat
Browse files Browse the repository at this point in the history
And add it to the DID file for similar reason.
  • Loading branch information
hansl committed May 11, 2021
1 parent 6973104 commit d0581f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions assets.did
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ service: {
}) -> ();

http_request: (request: HttpRequest) -> (HttpResponse) query;
http_request_stream_callback: (token: opt Token) -> (StreamingCallbackHttpResponse) query;

authorize: (principal) -> ();
}
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ fn create_strategy(
) -> Option<StreamingStrategy> {
create_token(asset, enc_name, enc, key, chunk_index).map(|token| StreamingStrategy::Callback {
callback: ic_cdk::export::candid::Func {
method: "http_request_stream_callback".to_string(),
method: "http_request_streaming_callback".to_string(),
principal: ic_cdk::id(),
},
token,
Expand Down Expand Up @@ -674,7 +674,7 @@ fn http_request(req: HttpRequest) -> HttpResponse {
}

#[query]
fn http_request_stream_callback(
fn http_request_streaming_callback(
Token {
key,
content_encoding,
Expand Down

0 comments on commit d0581f7

Please sign in to comment.