[英]Getting Error in Azure Logic Apps in HTTP POST :- "BadRequest. Http request failed: the content was not a valid JSON."
I have created a Logic App in Azure which uses HTTP Action Connector
to POST request to a REST API.我在 Azure 中创建了一个逻辑应用程序,它使用
HTTP Action Connector
向 REST ZDB93442387104ACADE POST 请求
The JSON body of this request looks like below:-此请求的 JSON 正文如下所示:-
{
"id": 40,
"salutation": "Mr",
"firstName": "Smith",
"lastName": "Jack",
"ageRange": "18-20",
"gender": "male",
"emailAddress": "atet4gsg@gmail.com",
"phone": "3532523523",
"phoneType": "mobile",
"addressStreet": "1234",
"addressCity": "gagdgd",
"addressCounty": "gadgg",
"addressCountry": "UK",
"addressPostcode": "235dgds",
"preferredContactMethod": "email",
"leadType": "sales",
"leadForm": "brochure",
"dealerId": 1111,
"dealerDepartment": "New Vehicle Sales",
"externalSalepersonName": "3532532",
"leadCurrency": "GBP",
"leadMin": 1000,
"leadMax": 150000,
"leadStatus": "New",
"interestInAccessories": "yes",
"interestInFinance": "yes",
"interestInInsurance": "yes",
"interestInPurchase": "yes",
"comments": "Test",
"vehicleModelYear": 2019,
"vehicleBodyStyle": "saloon",
"vehicleEngineType": 2,
"vehicleFuelType": "petrol",
"transmission": "manual",
"exteriorColour": "Brown",
"interiorColour": "Brown",
"make": "2019",
"modelDescription": "A-Class",
"modelYear": 2019,
"vin": "353253",
"registrationNumber": "2532532532",
"odometerReading": 53,
"serviceDate": "2019-12-04",
"price": 53253,
"vinVerified": "no",
"sentToPOS": "no"
}
It initially worked for me but now somehow I have started getting an error as "BadRequest. Http request failed: the content was not a valid JSON."
它最初对我有用,但现在不知何故我开始收到错误
"BadRequest. Http request failed: the content was not a valid JSON."
Please help if anyone has any idea about this issue.如果有人对此问题有任何想法,请提供帮助。
This issue has been resolved.此问题已得到解决。 The problem was with the API I was requesting was not returning the response in the valid json format.
问题在于我请求的 API 没有以有效的 json 格式返回响应。 Hence, logic app was failing while formatting the HTTP response.
因此,逻辑应用程序在格式化 HTTP 响应时失败。 Thank you both for your replies.
谢谢你们的答复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.