Created
April 17, 2018 14:37
-
-
Save nulpatrol/c775b25b2fded4a79fcca42116129b26 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require("axios"); | |
const express = require("express"); | |
var qs = require('qs'); | |
const app = express(); | |
app.get("/bacon", (req, res) => { | |
axios.post( | |
"https://booking.uz.gov.ua/route/", | |
"routes%5B0%5D%5Bfrom%5D=2200001&routes%5B0%5D%5Bto%5D=2218000&routes%5B0%5D%5Bdate%5D=2018-05-26&routes%5B0%5D%5Btrain%5D=131%D0%9E", | |
{ | |
headers: { | |
'Content-Type': 'application/x-www-form-urlencoded' | |
}, | |
}) | |
.then(bacon => { | |
res.send(bacon.data.data.routes); | |
}); | |
}); | |
app.listen(8085, () => console.log('Example app listening on port 8085!')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment