test.select.js 415 B

123456789101112131415
  1. main()
  2. async function main(){
  3. let response = await fetch(`https://dev.fmode.cn/api/psql/select`, {
  4. headers: {
  5. "Content-Type": "application/json"
  6. },
  7. body: JSON.stringify({"sql":"SELECT * FROM \"_User\" limit 5","params":[1]}),
  8. method: "POST",
  9. mode: "cors",
  10. credentials: "omit"
  11. });
  12. let result = await response?.json();
  13. console.log(result)
  14. }