What is the equivalent Julia code for this code in Python using requests?

You can do something like this

using HTTP
using JSON3

headers = ["apikey" => "c1a274360-9ebf-11eb-86374-ffd0a6421e7d"]

params = ["type" => "prematch"]

uri = "https://app.sportdataapi.com/api/v1/soccer/odds/120423"

res = HTTP.get(uri, query = params, headers = headers)
res = JSON3.read(res.body)

julia> res
JSON3.Object{Vector{UInt8}, Vector{UInt64}} with 2 entries:
  :query => {…
  :data  => {…
3 Likes