package com.jiayue.ipp.idp.api;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.xml.ws.Response;

/**
 * @Author: tl
 * @Date: 2023/6/30 9:17
 */
@Slf4j
@Service
public class CallBackPassApi {

    public void realPowerForQr(String body){

        String url = "https://api.jiayuepowertech.com:8080/task/result";
        // 构造请求对象

        HttpRequest request = HttpRequest.post(url).body(body);

        // 发送请求并获取响应对象
        HttpResponse response = request.execute();

        log.info("回传实际功率状态=》", response.body());

    }
}
