【发布时间】:2023-03-16 21:56:01
【问题描述】:
我正在尝试使用 RestClient 发布值。它总是显示以下错误。
RestClient::BadRequest(400 错误请求):
尝试了 SO 中的所有答案。没有任何帮助。这是我的代码。
response = RestClient.post "http://192.72.114.66/WDSTEST_WS/WDS_SERVICE.svc/companymaster/Add",{"CompanyMaster":{"Address1":"Raja Street cbe","BussinessProfile":"lll","City":"statee","CompanyID": 24,"CompanyName":"Ramu Metall","CreatedBy":138,"Email":"abcd@gmail.com","IsActive":true,"LandLine":"435435","MobileNumber1":"8787871221" ,"ModifiedBy":138,"PinCode":0,"Remarks":"null","State":"null","TonnageKM":"0","TotalInsurableGoodValueForPreviousYear":0.00,"TotalInsurableGoodValuePerYear":0.00," TotalTransportationCostForPreviousYear":0.00,"TotalTransportationCostPerYear":0.00,"TotalTransportedWeightPerYear":0.00,"Website":"null"}},标题:{"Content-Type" => "application/json"}
这只是一个虚拟数据。 请帮忙。提前致谢。
【问题讨论】: