简体   繁体   English

Getting Error in Azure Logic Apps in HTTP POST:- "BadRequest. Http request failed: the content was not a valid JSON."

[英]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.

相关问题 Azure Logic应用步骤失败,错误为“ BadRequest。 Http请求失败:超时已到” - Azure Logic App Step Fails with error “BadRequest. Http request failed: the timeout was reached” Azure Logic应用程序SMTP连接器{“代码”:“ BadRequest”,“消息”:“ Http请求失败:超时。”} - Azure Logic Apps SMTP Connector {“code”:“BadRequest”,“message”:“Http request failed: the timeout was reached.”} 获取 Azure 逻辑应用程序中的 HTTP 请求标头 - Get HTTP request headers in Azure Logic Apps AzureCognitive R 包翻译服务返回 http 400:“请求正文不是有效的 JSON。” - AzureCognitive R package translate service returns http 400: "body of request is not valid JSON." Azure Logic应用-HTTP侦听器 - Azure Logic Apps - HTTP Listener 如何在Azure逻辑应用程序中存储来自HTTP的json返回 - How to store the json return from HTTP inside logic apps in Azure 如何在Azure Logic应用中将CSV文件内容传递给Http Call - How to pass csv file content to Http Call in Azure Logic Apps Azure 逻辑应用程序 http 连接器不解析查询中的 json - Azure logic apps http connector does not parse json in queries Logic Apps-使用json从http请求正文获取电子邮件信息 - Logic Apps - Get Email Infos from http request body with json Azure 逻辑应用 HTTP Post 使用动态变量构建 JSON - Azure Logic App HTTP Post build JSON with Dynamic Variables
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM