休息 API post 请求在 Mac 和 Ubuntu 的 Postman 中不起作用,但仅在 Windows 中起作用
Rest API post request not working in Postman for Mac and Ubuntu but working in Windows only
API: http://115.249.4.198:8288/Services/Common/prospectService.svc/IosAddLead
请求Body:
{
"baseEntity":{
"BaseDBName":"BuddyCRMDB_001",
"BaseSubscriptionID":"Buddy_001",
"CustomEditId":0,
"BaseUserID":1
},
"CustomerEntity":{
"tradingFields":[
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Account Profile",
"FieldNameMaster":"AccountProfile",
"IsVisible":true,
"IsExisting":true,
"ID":19,
"Value":1
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Contact Frequency",
"FieldNameMaster":"ContactFrequency",
"IsVisible":true,
"IsExisting":true,
"ID":22,
"Value":3
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Lead Source",
"FieldNameMaster":"LeadSource",
"IsVisible":true,
"IsExisting":true,
"ID":21,
"Value":1
},
{
"FieldDataType":"Date",
"IsMandatory":false,
"FieldName":"trade date",
"FieldNameMaster":"trade date",
"IsVisible":true,
"IsExisting":false,
"ID":4264,
"Value":""
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Lead Status",
"FieldNameMaster":"LeadStatus",
"IsVisible":true,
"IsExisting":true,
"ID":48,
"Value":3
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Campaign11",
"FieldNameMaster":"CampaignID",
"IsVisible":true,
"IsExisting":true,
"ID":44,
"Value":5
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Other Supplier",
"FieldNameMaster":"OtherSupplier",
"IsVisible":true,
"IsExisting":true,
"ID":27,
"Value":""
},
{
"FieldDataType":"DropDown",
"IsMandatory":false,
"FieldName":"BudgetYear StartDate",
"FieldNameMaster":"BudgetYearStartDate",
"IsVisible":true,
"IsExisting":true,
"ID":24,
"Value":0
},
{
"FieldDataType":"Dropdown",
"IsMandatory":false,
"FieldName":"Industry",
"FieldNameMaster":"Industry",
"IsVisible":true,
"IsExisting":true,
"ID":28,
"Value":0
},
{
"FieldDataType":"Numeric",
"IsMandatory":false,
"FieldName":"MX System",
"FieldNameMaster":"AnnualRevenue",
"IsVisible":true,
"IsExisting":true,
"ID":29,
"Value":""
},
{
"FieldDataType":"Numeric",
"IsMandatory":false,
"FieldName":"Credit Terms",
"FieldNameMaster":"CreditTerms",
"IsVisible":true,
"IsExisting":true,
"ID":32,
"Value":""
},
{
"FieldDataType":"Numeric",
"IsMandatory":false,
"FieldName":"Credit Limit",
"FieldNameMaster":"CreditLimit",
"IsVisible":true,
"IsExisting":true,
"ID":33,
"Value":""
},
{
"FieldDataType":"DropDown",
"IsMandatory":false,
"FieldName":"Usual Spend Date",
"FieldNameMaster":"UsualSpendDate",
"IsVisible":true,
"IsExisting":true,
"ID":25,
"Value":0
},
{
"FieldDataType":"Dropdown",
"IsMandatory":false,
"FieldName":"trade drop",
"FieldNameMaster":"trade drop",
"IsVisible":true,
"IsExisting":false,
"ID":3263,
"Value":""
},
{
"FieldDataType":"Numeric",
"IsMandatory":false,
"FieldName":"trade numeric",
"FieldNameMaster":"trade numeric",
"IsVisible":true,
"IsExisting":false,
"ID":4265,
"Value":""
}
],
"RecordId":0,
"masterFields":[
{
"FieldDataType":"Text",
"IsMandatory":true,
"FieldName":"Company name",
"FieldNameMaster":"CompanyName",
"IsVisible":true,
"IsExisting":true,
"ID":4,
"Value":"test new "
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Range",
"FieldNameMaster":"Range",
"IsVisible":true,
"IsExisting":false,
"ID":1235,
"Value":""
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"lead drop",
"FieldNameMaster":"lead drop",
"IsVisible":true,
"IsExisting":false,
"ID":3259,
"Value":"Three"
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Owner",
"FieldNameMaster":"OwnerID",
"IsVisible":true,
"IsExisting":true,
"ID":6,
"Value":1
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Website",
"FieldNameMaster":"Website",
"IsVisible":true,
"IsExisting":true,
"ID":8,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Twitter",
"FieldNameMaster":"Twitter",
"IsVisible":true,
"IsExisting":true,
"ID":9,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Facebook",
"FieldNameMaster":"Facebook",
"IsVisible":true,
"IsExisting":true,
"ID":10,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Building",
"FieldNameMaster":"Building",
"IsVisible":true,
"IsExisting":true,
"ID":11,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Street",
"FieldNameMaster":"Street",
"IsVisible":true,
"IsExisting":true,
"ID":12,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"City",
"FieldNameMaster":"City",
"IsVisible":true,
"IsExisting":true,
"ID":13,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"ZipCode",
"FieldNameMaster":"ZipCode",
"IsVisible":true,
"IsExisting":true,
"ID":36,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"State",
"FieldNameMaster":"State",
"IsVisible":true,
"IsExisting":true,
"ID":34,
"Value":""
},
{
"FieldDataType":"DropDown",
"IsMandatory":false,
"FieldName":"Country",
"FieldNameMaster":"CountryID",
"IsVisible":true,
"IsExisting":true,
"ID":35,
"Value":0
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Phone",
"FieldNameMaster":"Phone",
"IsVisible":true,
"IsExisting":true,
"ID":37,
"Value":""
},
{
"FieldDataType":"Date",
"IsMandatory":false,
"FieldName":"lead date",
"FieldNameMaster":"lead date",
"IsVisible":true,
"IsExisting":false,
"ID":3260,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Lead text",
"FieldNameMaster":"Lead text",
"IsVisible":true,
"IsExisting":false,
"ID":3258,
"Value":""
},
{
"FieldDataType":"Numeric",
"IsMandatory":false,
"FieldName":"lead numeric",
"FieldNameMaster":"lead numeric",
"IsVisible":true,
"IsExisting":false,
"ID":3261,
"Value":""
},
{
"FieldDataType":"Dropdown",
"IsMandatory":false,
"FieldName":"Testdroppp",
"FieldNameMaster":"Testdroppp",
"IsVisible":true,
"IsExisting":false,
"ID":4273,
"Value":""
}
],
"BasicContactList":[
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Title",
"FieldNameMaster":"Title",
"IsVisible":true,
"IsExisting":true,
"ID":14,
"Value":3
},
{
"FieldDataType":"Text",
"IsMandatory":true,
"FieldName":"First Name",
"FieldNameMaster":"FirstName",
"IsVisible":true,
"IsExisting":true,
"ID":15,
"Value":"asdfasd"
},
{
"FieldDataType":"Text",
"IsMandatory":true,
"FieldName":"Last Name",
"FieldNameMaster":"LastName",
"IsVisible":true,
"IsExisting":true,
"ID":16,
"Value":"asdasdasd"
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Job Title",
"FieldNameMaster":"JobTitle",
"IsVisible":true,
"IsExisting":true,
"ID":17,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Email",
"FieldNameMaster":"Email",
"IsVisible":true,
"IsExisting":true,
"ID":18,
"Value":""
}
]
},
"completeAddress":""
}
我想知道为什么此请求仅适用于 Windows 的 Postman。所有 headers 和设置都相同。所有机器上的Postman版本号都是一样的
既然你说你在 ubuntu 上遇到超时错误。确认您 ubuntu 机器上确实可以连接到互联网。试试这个。
ping -c 10 somesite.net
你有防火墙吗?您需要在 ubuntu 系统上设置代理吗?将 windows 系统的代理设置与 ubuntu 系统进行比较。
是的,你是对的,这是因为防火墙设置。但很奇怪。
谢谢,现在一切正常。
API: http://115.249.4.198:8288/Services/Common/prospectService.svc/IosAddLead
请求Body:
{
"baseEntity":{
"BaseDBName":"BuddyCRMDB_001",
"BaseSubscriptionID":"Buddy_001",
"CustomEditId":0,
"BaseUserID":1
},
"CustomerEntity":{
"tradingFields":[
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Account Profile",
"FieldNameMaster":"AccountProfile",
"IsVisible":true,
"IsExisting":true,
"ID":19,
"Value":1
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Contact Frequency",
"FieldNameMaster":"ContactFrequency",
"IsVisible":true,
"IsExisting":true,
"ID":22,
"Value":3
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Lead Source",
"FieldNameMaster":"LeadSource",
"IsVisible":true,
"IsExisting":true,
"ID":21,
"Value":1
},
{
"FieldDataType":"Date",
"IsMandatory":false,
"FieldName":"trade date",
"FieldNameMaster":"trade date",
"IsVisible":true,
"IsExisting":false,
"ID":4264,
"Value":""
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Lead Status",
"FieldNameMaster":"LeadStatus",
"IsVisible":true,
"IsExisting":true,
"ID":48,
"Value":3
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Campaign11",
"FieldNameMaster":"CampaignID",
"IsVisible":true,
"IsExisting":true,
"ID":44,
"Value":5
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Other Supplier",
"FieldNameMaster":"OtherSupplier",
"IsVisible":true,
"IsExisting":true,
"ID":27,
"Value":""
},
{
"FieldDataType":"DropDown",
"IsMandatory":false,
"FieldName":"BudgetYear StartDate",
"FieldNameMaster":"BudgetYearStartDate",
"IsVisible":true,
"IsExisting":true,
"ID":24,
"Value":0
},
{
"FieldDataType":"Dropdown",
"IsMandatory":false,
"FieldName":"Industry",
"FieldNameMaster":"Industry",
"IsVisible":true,
"IsExisting":true,
"ID":28,
"Value":0
},
{
"FieldDataType":"Numeric",
"IsMandatory":false,
"FieldName":"MX System",
"FieldNameMaster":"AnnualRevenue",
"IsVisible":true,
"IsExisting":true,
"ID":29,
"Value":""
},
{
"FieldDataType":"Numeric",
"IsMandatory":false,
"FieldName":"Credit Terms",
"FieldNameMaster":"CreditTerms",
"IsVisible":true,
"IsExisting":true,
"ID":32,
"Value":""
},
{
"FieldDataType":"Numeric",
"IsMandatory":false,
"FieldName":"Credit Limit",
"FieldNameMaster":"CreditLimit",
"IsVisible":true,
"IsExisting":true,
"ID":33,
"Value":""
},
{
"FieldDataType":"DropDown",
"IsMandatory":false,
"FieldName":"Usual Spend Date",
"FieldNameMaster":"UsualSpendDate",
"IsVisible":true,
"IsExisting":true,
"ID":25,
"Value":0
},
{
"FieldDataType":"Dropdown",
"IsMandatory":false,
"FieldName":"trade drop",
"FieldNameMaster":"trade drop",
"IsVisible":true,
"IsExisting":false,
"ID":3263,
"Value":""
},
{
"FieldDataType":"Numeric",
"IsMandatory":false,
"FieldName":"trade numeric",
"FieldNameMaster":"trade numeric",
"IsVisible":true,
"IsExisting":false,
"ID":4265,
"Value":""
}
],
"RecordId":0,
"masterFields":[
{
"FieldDataType":"Text",
"IsMandatory":true,
"FieldName":"Company name",
"FieldNameMaster":"CompanyName",
"IsVisible":true,
"IsExisting":true,
"ID":4,
"Value":"test new "
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Range",
"FieldNameMaster":"Range",
"IsVisible":true,
"IsExisting":false,
"ID":1235,
"Value":""
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"lead drop",
"FieldNameMaster":"lead drop",
"IsVisible":true,
"IsExisting":false,
"ID":3259,
"Value":"Three"
},
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Owner",
"FieldNameMaster":"OwnerID",
"IsVisible":true,
"IsExisting":true,
"ID":6,
"Value":1
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Website",
"FieldNameMaster":"Website",
"IsVisible":true,
"IsExisting":true,
"ID":8,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Twitter",
"FieldNameMaster":"Twitter",
"IsVisible":true,
"IsExisting":true,
"ID":9,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Facebook",
"FieldNameMaster":"Facebook",
"IsVisible":true,
"IsExisting":true,
"ID":10,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Building",
"FieldNameMaster":"Building",
"IsVisible":true,
"IsExisting":true,
"ID":11,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Street",
"FieldNameMaster":"Street",
"IsVisible":true,
"IsExisting":true,
"ID":12,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"City",
"FieldNameMaster":"City",
"IsVisible":true,
"IsExisting":true,
"ID":13,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"ZipCode",
"FieldNameMaster":"ZipCode",
"IsVisible":true,
"IsExisting":true,
"ID":36,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"State",
"FieldNameMaster":"State",
"IsVisible":true,
"IsExisting":true,
"ID":34,
"Value":""
},
{
"FieldDataType":"DropDown",
"IsMandatory":false,
"FieldName":"Country",
"FieldNameMaster":"CountryID",
"IsVisible":true,
"IsExisting":true,
"ID":35,
"Value":0
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Phone",
"FieldNameMaster":"Phone",
"IsVisible":true,
"IsExisting":true,
"ID":37,
"Value":""
},
{
"FieldDataType":"Date",
"IsMandatory":false,
"FieldName":"lead date",
"FieldNameMaster":"lead date",
"IsVisible":true,
"IsExisting":false,
"ID":3260,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Lead text",
"FieldNameMaster":"Lead text",
"IsVisible":true,
"IsExisting":false,
"ID":3258,
"Value":""
},
{
"FieldDataType":"Numeric",
"IsMandatory":false,
"FieldName":"lead numeric",
"FieldNameMaster":"lead numeric",
"IsVisible":true,
"IsExisting":false,
"ID":3261,
"Value":""
},
{
"FieldDataType":"Dropdown",
"IsMandatory":false,
"FieldName":"Testdroppp",
"FieldNameMaster":"Testdroppp",
"IsVisible":true,
"IsExisting":false,
"ID":4273,
"Value":""
}
],
"BasicContactList":[
{
"FieldDataType":"Dropdown",
"IsMandatory":true,
"FieldName":"Title",
"FieldNameMaster":"Title",
"IsVisible":true,
"IsExisting":true,
"ID":14,
"Value":3
},
{
"FieldDataType":"Text",
"IsMandatory":true,
"FieldName":"First Name",
"FieldNameMaster":"FirstName",
"IsVisible":true,
"IsExisting":true,
"ID":15,
"Value":"asdfasd"
},
{
"FieldDataType":"Text",
"IsMandatory":true,
"FieldName":"Last Name",
"FieldNameMaster":"LastName",
"IsVisible":true,
"IsExisting":true,
"ID":16,
"Value":"asdasdasd"
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Job Title",
"FieldNameMaster":"JobTitle",
"IsVisible":true,
"IsExisting":true,
"ID":17,
"Value":""
},
{
"FieldDataType":"Text",
"IsMandatory":false,
"FieldName":"Email",
"FieldNameMaster":"Email",
"IsVisible":true,
"IsExisting":true,
"ID":18,
"Value":""
}
]
},
"completeAddress":""
}
我想知道为什么此请求仅适用于 Windows 的 Postman。所有 headers 和设置都相同。所有机器上的Postman版本号都是一样的
既然你说你在 ubuntu 上遇到超时错误。确认您 ubuntu 机器上确实可以连接到互联网。试试这个。
ping -c 10 somesite.net
你有防火墙吗?您需要在 ubuntu 系统上设置代理吗?将 windows 系统的代理设置与 ubuntu 系统进行比较。
是的,你是对的,这是因为防火墙设置。但很奇怪。 谢谢,现在一切正常。