lib/deepl/requests/glossary/create.rb in deepl-rb-2.5.3 vs lib/deepl/requests/glossary/create.rb in deepl-rb-3.0.0
- old
+ new
@@ -1,5 +1,8 @@
+# Copyright 2022 Daniel Herzog
+# Use of this source code is governed by an MIT
+# license that can be found in the LICENSE.md file.
# frozen_string_literal: true
module DeepL
module Requests
module Glossary
@@ -18,10 +21,21 @@
def request
payload = {
name: name, source_lang: source_lang, target_lang: target_lang, entries: entries_to_tsv,
entries_format: entries_format
}
- build_glossary(*post(payload))
+ build_glossary(*execute_request_with_retries(post_request(payload)))
+ end
+
+ def details
+ "HTTP Headers: #{headers}\nPayload #{{
+ name: name, source_lang: source_lang, target_lang: target_lang, entries: entries_to_tsv,
+ entries_format: entries_format
+ }}"
+ end
+
+ def to_s
+ "POST #{uri.request_uri}"
end
private
def entries_to_tsv