diff options
Diffstat (limited to 'frontend/src/SECAPIData.js')
-rw-r--r-- | frontend/src/SECAPIData.js | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/frontend/src/SECAPIData.js b/frontend/src/SECAPIData.js new file mode 100644 index 0000000..daa653a --- /dev/null +++ b/frontend/src/SECAPIData.js @@ -0,0 +1,47 @@ +import React, {useState, useRef} from 'react'; + + +function SECAPIData() { + + const [filedAt, setFiledAt] = useState(""); + const [xml, setXML] = useState(""); + + const requestData = () => { + + const toSend = { + filedAt : filedAt, + xml : xml, + }; + + let axiosConfig = { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', + "Access-Control-Allow-Origin": "*", + } + }; + + axios({ + method: 'post', + url: 'http://localhost:4567/', + headers: axiosConfig, + data: toSend + }) + + .then(response => { + + }) + .catch(function (error) { + console.log(error); + }); + } + + return ( + <div> + <h1 >SECAPIData</h1> + <Button onPress={requestData}>GETDATA</Button> + </div> + ); +} + +export default SECAPIData; +
\ No newline at end of file |