Google 页 Api 应要求提供俄罗斯符号 body

Google Sheets Api russian symbols at request body

学习如何使用 google 工作表 api v4。尝试按要求创建带有自定义标题的电子表格:

POST https://sheets.googleapis.com/v4/spreadsheets and body:
{
    "properties":{
        "title": "АЦ Витебский"
    }
}

headers:

Authorization: "Bearer ..."
Content-type: "text/plain, charset=UTF-8"
Accept-Encoding: "gzip"

生成电子表格名称时出现问题:“????????????”

尝试各种字符集和编码

在 java

的 spring 申请中使用它

通过为 restTemplate 添加 MessageConverter 来解决这个问题

template.getMessageConverters()
                .add(0, new StringHttpMessageConverter(StandardCharsets.UTF_8));