Skip to content

Commit

Permalink
fixed bug in requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiran Gopinathan committed Mar 22, 2023
1 parent c8768fa commit 5cc09f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/resolver/requests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ let signed_post (key_id, priv_key) uri body_str =
|> Cohttp.Header.of_list in
req_post ~headers uri body_str

let signed_get ?content_type (key_id, priv_key) uri =
let signed_get ?accept (key_id, priv_key) uri =
let current_time = Ptime_clock.now () in
let headers =
Http_sig.build_signed_headers
~current_time ~method_:"GET"
~headers:(Http_sig.StringMap.of_list [
"Content-Type", Option.value content_type ~default:APConstants.ContentType.ld_json_activity_streams
"Accept", Option.value accept ~default:APConstants.ContentType.ld_json_activity_streams
]) ~key_id ~priv_key ~uri ()
|> Cohttp.Header.of_list in
req ~headers uri

let signed_activity_req key url =
signed_get ~content_type:APConstants.ContentType.activity_json key url
signed_get ~accept:APConstants.ContentType.activity_json key url

let activity_req ?(headers=[]) url =
let activity_header =
Expand Down

0 comments on commit 5cc09f2

Please sign in to comment.