Skip to content

show_billed_characters not returned in response #10

@leoplct

Description

@leoplct

DeepL.translate("<head><title>Ciao</title></head>", "IT", "EN", show_billed_characters: true, tag_handling: 'html').as_json

The returned response do not have the number of billed characters (API docs).

{"request"=>
  {"authorization"=>["DeepL-Auth-Key xxxxxx:fx"],
   "user-agent"=>["deepl-ruby/3.0.2 (darwin23) ruby/3.3.1"],
   "content-type"=>["application/json"],
   "accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"],
   "accept"=>["*/*"],
   "connection"=>["close"],
   "host"=>["api-free.deepl.com"],
   "content-length"=>["175"]},
 "response"=>
  {"date"=>["Thu, 06 Feb 2025 15:04:32 GMT"],
   "content-type"=>["application/json"],
   "transfer-encoding"=>["chunked"],
   "vary"=>["Accept-Encoding"],
   "access-control-allow-origin"=>["*"],
   "strict-transport-security"=>["max-age=63072000; includeSubDomains; preload"],
   "server-timing"=>["l7_lb_tls;dur=165, l7_lb_idle;dur=6, l7_lb_receive;dur=0, l7_lb_total;dur=271"],
   "access-control-expose-headers"=>["Server-Timing, X-Trace-ID"],
   "x-trace-id"=>["5167a3dfe17c4b90bef0da45a01a17d7"],
   "connection"=>["close"]},
 "text"=>"<head><title>Hi</title></head>",
 "detected_source_language"=>"IT",
 "model_type_used"=>nil}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions