#PgnInJson not working?

1 messages · Page 1 of 1 (latest)

gray scroll
#

hi, im trying export game as a json (like in documentation example from https://lichess.org/api#tag/Games/operation/gamePgn) but i see only in raw string. any ideas? or i did missunderstanding?

(byebug) result
#<Net::HTTPOK 200 OK readbody=true>
(byebug) request
<RestClient::Request @method="get", @url="https://lichess.org/game/export/EKH3MToO?moves=true&pgnInJson=true&tags=true&clocks=true&evals=true&opening=true&literate=false">
(byebug) request.headers
{"Authorization"=>"Bearer --------------", "Content-Type"=>"application/json"}
twilit iris
#

the header you need to send is Accept: application/json

#

content type is what you are sending, not what you want to recieve