时间:将本地事实与变量进行比较

时间:2019-12-22 13:45:55

标签: ansible-facts

也许我只是在寻找错误的方法,但是在条件中使用事实和变量的正确方法是什么? 如:

handleSubmit = async e => {

    e.preventDefault();
    var request = JSON.stringify({
        drug: this.state.drug,
        disease: this.state.disease,
        type: this.state.type    
    });
    var xmlRequest = js2xmlparser.parse("request", request);

    const response = await fetch('/api/submit', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
        },
        body: request
    });

    const body = await response.text();

    this.setState({
        responseToPost: body
    });
}

0 个答案:

没有答案