Ask coding questions

← Back to all posts
Make multiple Api Requests every 30 Seconds
lukejamison (0)

Hello, I want to make a Post request to an​ API endpoint and then return JSON data from the response and only pull out 2 keys with there values. then i want to take the 2 JSON vales and add them to a new JSON​ string and then PUT that JSON string with the 2 values that we got from the first POST request and send them to an​ API​ endpoint. Al,​so i would like all of this to hapeen every 30 seconds and i need nelp with processing a env variable or hiding​ an APi key. https://repl.it/@lukejamison/View-Car Thank you

Commentshotnewtop
Vandesm14 (754)

Did you already create a .env with xapikey=abc123?
If so, use all caps for the key like so: XAPIKEY

lukejamison (0)

@Vandesm14 No i did not is that the best way to do it so that its not in the logs?