Skip to content

Instantly share code, notes, and snippets.

@nulpatrol
Created April 17, 2018 14:37
Show Gist options
  • Save nulpatrol/c775b25b2fded4a79fcca42116129b26 to your computer and use it in GitHub Desktop.
Save nulpatrol/c775b25b2fded4a79fcca42116129b26 to your computer and use it in GitHub Desktop.
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