返回值记录时的表达式错误
Expression Error When Returning Value to Record
我正在尝试发出此 POST 请求以检索 JWT 令牌以作为记录存储在 table 中。它确实检索了令牌。但是,我收到错误消息“Expression.Error:我们无法将值“eyJhbGciOiJIUzI1NiIs...”转换为类型 Record。Type=[Type]”。想知道我哪里出错了吗?
let
url = "https://sapif.callminer.net/security/getToken",
body = "{""Username"": ""xxxxx"", ""Password"": ""xxxx"", ""ApiKey"": ""xxxxxx""}",
Parsed_JSON = Json.Document(body),
BuildQueryString = Uri.BuildQueryString(Parsed_JSON),
token = Json.Document(Web.Contents(url,[Headers = [#"Content-Type"="application/json; charset=utf-8"], Content = Text.ToBinary(body) ] )),
#"Converted in table" = Record.ToTable(token)
in
#"Converted in table"
想通了:
let url = "https://sapif.callminer.net/security/getToken", body = "{""Username"": ""svc-piautomation@alegeus.com"", ""Password"": ""3tmvF7c_U=ZCHywW"", ""ApiKey"": ""alegeus""}", Parsed_JSON = Json.Document(body), BuildQueryString = Uri.BuildQueryString(Parsed_JSON), token = Json.Document(Web.Contents(url,[Headers = [#"Content-Type"="application/json; charset=utf-8"], Content = Text.ToBinary(body) ] )), #"Converted in table" = Record.ToTable([Token = token]) in #"Converted in table"
我正在尝试发出此 POST 请求以检索 JWT 令牌以作为记录存储在 table 中。它确实检索了令牌。但是,我收到错误消息“Expression.Error:我们无法将值“eyJhbGciOiJIUzI1NiIs...”转换为类型 Record。Type=[Type]”。想知道我哪里出错了吗?
let
url = "https://sapif.callminer.net/security/getToken",
body = "{""Username"": ""xxxxx"", ""Password"": ""xxxx"", ""ApiKey"": ""xxxxxx""}",
Parsed_JSON = Json.Document(body),
BuildQueryString = Uri.BuildQueryString(Parsed_JSON),
token = Json.Document(Web.Contents(url,[Headers = [#"Content-Type"="application/json; charset=utf-8"], Content = Text.ToBinary(body) ] )),
#"Converted in table" = Record.ToTable(token)
in
#"Converted in table"
想通了:
let url = "https://sapif.callminer.net/security/getToken", body = "{""Username"": ""svc-piautomation@alegeus.com"", ""Password"": ""3tmvF7c_U=ZCHywW"", ""ApiKey"": ""alegeus""}", Parsed_JSON = Json.Document(body), BuildQueryString = Uri.BuildQueryString(Parsed_JSON), token = Json.Document(Web.Contents(url,[Headers = [#"Content-Type"="application/json; charset=utf-8"], Content = Text.ToBinary(body) ] )), #"Converted in table" = Record.ToTable([Token = token]) in #"Converted in table"