I am writing a Vue app that displays certain data from json. Getting json from an external API with axios works as expected. The problem is that I also want to be able to use data that is on my computer.
At first I tried sending it in form data. This works but the problem is that max url parameter length is limited. I cannot use a post request because the app says: "Cannot POST /"
Is it possible to show data from a local file on vue app running on a server?
EDIT: Let's say the json is "{ "id": 1, "name": "foo" }". I can send it to my app with
var json = '{ "id": 1, "name": "foo" }';
var form = $('<form action="' + url + '" method="get">' +
'<input type="hidden" name="json" value="' + encodeURI(json) + '" />' +
'</form>');
$('body').append(form);
form.submit();
which can then display this data. The issue is that 2048 characters is not enough for my use case.