我遇到了使用我的代码从API获得响应的问题,请求没有超时,它根本没有给我回复.我已经在我自己的API中创建了一个api端点,以返回json字符串,然后用"Firefox Poster"手动发布json数据,它运行正常.有了这个,我相信问题出现在我的代码中.
我得到了一个C#WebAPI,我正在开发它与Angular前端一起使用(这是有效的,它仅用于历史).在调用我的API时,我创建了对象"EnrollmentRequestDto"
public class EnrollmentRequestDto
{
/// <summary>
/// Context Information for the request. Contains the Ship-To, language code and timezone.
/// </summary>
[JsonProperty("requestContext")]
public RequestContextDto RequestContext { get; set; }
/// <summary>
/// Unique ID provided by DEP to reseller on provisioning DEP access. This would be the reseller's DEP ID if its posted by distributor OBO a reseller, and would be his own depResellerId if a reseller is posting for self.
/// </summary>
[JsonProperty("depResellerId")]
public string DepResellerId …Run Code Online (Sandbox Code Playgroud)