Конвертируется через Почтальона.
require 'uri'
require 'net/http'
url = URI("https://some.domain/repository/npm/-/user/org.couchdb.user:anonymous")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Cache-Control"] = 'no-cache'
request["Postman-Token"] = '9e3622cd-fda5-458d-2521-325849546ef7'
request.body = "{\"name\": \"anonymous\", \"password\": \"obfuscated\"}"
response = http.request(request)
puts response.read_body