File tree Expand file tree Collapse file tree 3 files changed +1
-10
lines changed
motoko/send_http_post/src/send_http_post_backend
send_http_get/src/send_http_get_backend/src
send_http_post/src/send_http_post_backend/src Expand file tree Collapse file tree 3 files changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ actor {
31
31
// idempotency keys should be unique so we create a function that generates them.
32
32
let idempotency_key : Text = generateUUID();
33
33
let request_headers = [
34
- { name = "Host" ; value = host # ":443" },
35
34
{ name = "User-Agent" ; value = "http_post_sample" },
36
35
{ name = "Content-Type" ; value = "application/json" },
37
36
{ name = "Idempotency-Key" ; value = idempotency_key },
Original file line number Diff line number Diff line change @@ -37,10 +37,6 @@ async fn get_icp_usd_exchange() -> String {
37
37
// 2.2 prepare headers for the system http_request call
38
38
//Note that `HttpHeader` is declared in line 4
39
39
let request_headers = vec ! [
40
- HttpHeader {
41
- name: "Host" . to_string( ) ,
42
- value: format!( "{host}:443" ) ,
43
- } ,
44
40
HttpHeader {
45
41
name: "User-Agent" . to_string( ) ,
46
42
value: "exchange_rate_canister" . to_string( ) ,
Original file line number Diff line number Diff line change @@ -28,10 +28,6 @@ async fn send_http_post_request() -> String {
28
28
// 2.2 prepare headers for the system http_request call
29
29
//Note that `HttpHeader` is declared in line 4
30
30
let request_headers = vec ! [
31
- HttpHeader {
32
- name: "Host" . to_string( ) ,
33
- value: format!( "{host}:443" ) ,
34
- } ,
35
31
HttpHeader {
36
32
name: "User-Agent" . to_string( ) ,
37
33
value: "demo_HTTP_POST_canister" . to_string( ) ,
@@ -191,4 +187,4 @@ fn transform(raw: TransformArgs) -> HttpResponse {
191
187
ic_cdk:: api:: print ( format ! ( "Received an error from coinbase: err = {:?}" , raw) ) ;
192
188
}
193
189
res
194
- }
190
+ }
You can’t perform that action at this time.
0 commit comments