Commit 76b2d119 authored by Raghav Khanna's avatar Raghav Khanna

Connect to testing server with post request

parent d05bb08a
import React from 'react'
import axios from 'axios'
const SERVER_ADDR = "http://localhost:3000/"
const SERVER_ENDPOINT = "compile/wacc"
const SERVER_ADDR = "http://192.168.1.67:8080/"
const SERVER_ENDPOINT = ""
const testGraphData = [{
name: "WACC Program", children: [{
......@@ -19,7 +19,7 @@ export function astMetaToGraphData(astMeta) {
export function sendWaccCode(code) {
let ADDR = SERVER_ADDR + SERVER_ENDPOINT
console.log(`Sending ${code} to ${ADDR}`)
axios.get(ADDR)
axios.post(ADDR, {contents: code}, {headers:{'Content-Type': 'application/json'}})
.then(res => {
console.log(res)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment