Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 修复 rest_request UDF 报错 “No content to map to Obeject due to end of input”的问题.Fix the error of rest_request UDF "No content to map to Obeject due to end of input". #1708

Closed
ZhengshuaiPENG opened this issue Mar 10, 2022 · 1 comment
Assignees
Labels
Milestone

Comments

@ZhengshuaiPENG
Copy link
Contributor

当使用 rest 数据源时,采用下面的语法可以调通获取数据,api 是可以返回的

load Rest.`$worklog_list_url` 
 where `config.connect-timeout`="10s"
  and `config.method`="POST"
  and `header.content-type`="application/json"
  and `header.Authorization`='''Bearer $acc_ko'''
  and `body`='''{ 
   "ids": $ids
 } '''
as worklog_list1;

如果换成下面的 rest_request 的udf 来进行多次 api 调用时,返回的内容会报错 No content to map to Obeject due to end of input

 select  rest_request(
     "$worklog_list_url","POST", -- url/method
     map("ids",ids), -- params
     map("Content-Type" , "application/json", "Authorization", "Bearer $acc_ko"), -- headers
     map() -- config
 )  as resp from id_arrays_by_buckets as worklog_list1;
@hellozepp
Copy link
Contributor

#1709 fixd it.

@Lindsaylin Lindsaylin changed the title [Bug] rest_request UDF 报错 ”No content to map to Obeject due to end of input“ [Bug] 修复 rest_request UDF 报错 “No content to map to Obeject due to end of input”的问题.Fix the error of rest_request UDF "No content to map to Obeject due to end of input". Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants