我有一个反应组件,当按下复选框时,它会调用一个休息 api,使用单个参数发布请求。
我在 webapi 中放置了一个断点并且它从未命中,但我仍然在组件上获得了 415 unsopported 媒体类型
react js component (see onchange event)
import React, { Component } from 'react';
import { Table, Radio} from 'antd';
import { adalApiFetch } from '../../adalConfig';
import Notification from '../../components/notification';
class ListTenants extends Component {
constructor(props) {
super(props);
this.state = {
data: []
};
}
fetchData = () => {
adalApiFetch(fetch, "/Tenant", {})
.then(response => response.json())
.then(responseJson => {
if (!this.isCancelled) {
const results= responseJson.map(row => ({
key: row.ClientId,
ClientId: row.ClientId,
ClientSecret: row.ClientSecret, …Run Code Online (Sandbox Code Playgroud)