Having trouble fetching RSS XML data from external websites using the Axios and Vue.Js combination

I have been encountering an issue with utilizing the RSS XML feeds from multiple websites for my Web App. I attempted to incorporate the Axios function as shown below:

axios.get('https://www.15min.lt/rss/sportas')
     .then((response) => {
          loading = false;
          this.dataReceived = response;
          console.log(response);
     })
     .catch((error) => {
          loading = false;
          this.errorReceived = error;
          console.log({ error });
     });

Unfortunately, all I received was:

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

I attempted to deploy the entire project to the server as I discovered that this error might arise when using it locally on a personal machine. However, the outcome remained the same, except for the error now displaying my domain name instead of 'null'.

To determine if the issue lies on my end or if the website is blocking connections to the RSS feed, I tested another Web App built on Vue.js. Surprisingly, the web app at successfully worked with my links. This leads me to believe that resolving the problem is possible, but the solution currently eludes me.

My current project utilizes Vue.js, Axios, and jQuery.

Answer №1

After some searching, I discovered a simple solution on my own. This handy website - - is designed to assist with handling these types of requests.

To use it effectively, just follow the example below:

Retrieve XML from URL - https://cors.now.sh/https://example.com/rss-xml-link

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to display the text of a button once it has been clicked?

Trying to implement a fade-in effect on text when clicking a button. Any assistance would be greatly appreciated! $(".btnClick").click(function(event) { var x = $(this).text(); if (x == "PowerApps") { $(this).parent(".show-details").find('. ...

Having trouble loading a 3D model with ThreeJS in React?

I am currently utilizing React and ThreeJS to incorporate a 3D model into a webpage. However, I am encountering an issue with the function responsible for loading the mesh into my ThreeJS scene. The error message I am receiving is as follows: TypeError: C ...

Is it possible to implement jQuery events on all elements belonging to a specific class

Hey there, I'm facing a little challenge with my code. Currently, I have a snippet that allows a user using iOS to drag around a <div> with the class .drag on the webpage. Everything works perfectly when there's only one instance of .drag, ...

Struggling with expanding a Javascript object? Let us assist you!

Imagine having a JavaScript object... app.widget = {} (function (W) { W.superFunction = function() { console.log("Hey!"); } ...other functions... })(app.widget) Now, let's create a clone of this object... app.specialWidget ...

variety of provider setups available in Angular

Trying to learn Angular from various online sources can be quite confusing, as different people use different patterns when writing functions. Can someone please explain the .provider concept in Angular? I have experimented with the .provider method using ...

The data fetched from the API is not appearing in the FlatList component on the screen, even though it is successfully logged in the console. What could be causing this issue?

After successfully fetching data from an API in my React Native app and logging it to the console, I encountered an issue where the data is not showing up in the FlatList component. const HealthLinkMain = () => { const [data, setData] = useState([ ...

Dynamic addition of a Javascript script to a component leads to malfunctioning

I am facing an issue with a dynamically created component where I added the script tag, but unfortunately, the code inside is not functioning properly. Despite trying multiple solutions, none seem to work for me. Could you please review the code? https:// ...

What is the method for replacing browser bundle sources using Rollup?

Is it possible to use rollup to swap out a specific source with another source in an NPM package when creating a browser bundle? The source in question is loaded dynamically using import('./relativeFile.js') (I need this to be replaced). I attem ...

Is it possible to halt code execution in Node JS after sending a response?

I am currently learning Node JS and practicing to develop a MERN app. I have implemented two middleware functions named getUserById and isSignedIn. router.param("userId",getUserById) const getUserById = (req,res,next,id)=>{ User.findById( ...

How to retrieve the value of an input field in Angular 2/Typescript without using ngModel

Currently, I'm utilizing Typescript in conjunction with Angular2, mirroring the structure of the Angular2 Tour of Heroes guide. There is a specific input field that I aim to associate a change event with, triggering custom logic whenever the value wi ...

Tips for resolving a jspdf naming collision situation

In my react app, I am utilizing various jsPDF libraries as shown below: For exporting tables as HTML: import jsPDF from 'jspdf'; import "jspdf-autotable"; For converting SVG to PDF: const svg2pdf = require('svg2pdf.js'); con ...

Using Special Characters in React JS Applications

When handling CSV uploads with accented characters such as émily or ástha, I encountered the need to encode and pass them to the backend. Experimenting with different approaches, I tried adjusting the file type in FormData from 'text/plain' to ...

Why is the Express validator failing to work with the posted value?

I have come across an issue with my current code. Everything is working fine, but I need to access req.body.type in the createValidationFor function. However, when I try to access it, the validation stops working and I can't figure out why. router.po ...

Troubleshooting Vue.js Search Filter: Overcoming Challenges with Data Loading and Binding

I am currently working on a form that pulls data from an external JSON file to display as options. I'm attempting to add a search filter functionality to show the options as you type. Below is the computed code I have come up with: computed: { ...

Save information in a nested object within local storage by utilizing a dynamic key

Storing the below object in localStorage to simulate server-side login/logout functionalities. Current user logic is implemented to identify the logged-in user. let defaultUsers = [ { email: "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" ...

The hyperlink to a different webpage does not trigger any JavaScript functionalities or render any CSS styles

I am facing an issue with linking HTML pages that run Javascript and JQuery Mobile from another HTML page. My link setup is as follows: <a href="hours.html">Hours</a> The linking page and the linked pages are in the same directory. However, ...

Creating a unique SVG pattern starting from the center

I'm currently working on implementing a grid pattern that spans the entire viewport, following this solution. Although the grid starts from the top-left corner of the viewport, my goal is to have it start from the middle of the screen instead. This w ...

Extracting data from a JSON file and displaying it using Angular

I'm facing a challenge with parsing two JSON format data and displaying them in Angular. I'm unsure of how to proceed and need guidance. The second data includes a plan_id that refers to the "plan" data. How can I create a small lookup object to ...

Error encountered while using Chart.js with JSON dataset

Struggling to make this work... Here are the necessary scripts: <script src="Chart.js"></script> <script src="jquery-1.11.3.min.js"></script> This is the full code I am working with: <body> <div id="chartCanvas"> &l ...

Enhancing the visual appearance of a date in Vue when filling input fields

How can I format a date in an input box populated with Vue from an object? This is the example code showcasing how the input box is populated using :vue <input type="text" id="Example" :value="v.date" spellcheck="false"> The date stored in the obj ...