Comments (2)
Okay, so I added a rawData
key that you can either use as a service option, or as a fetch option if you need to fetch anything else than JSON data.
So, you can set your service like this : testRSS: { path: 'mydata.xml', rawData: true }
or directly when calling the fetch method : await api.fetch('testRSS', { rawData: true })
I'll soon publish this with some fixes.
from apipeline.
Hi,
I didn't think about adding an option to fetch data that's not in JSON. Once the network request is successful, I call res.data.json()
no matter what.
I should add an option to circumvent that behavior, so you can fetch any kind of data you want whilst keeping the cache layer.
Maybe a raw
key in the services options, or something like that ?
from apipeline.
Related Issues (17)
- How to Set Expiration Time on specific requests HOT 5
- How to implement Promise.all() in offlineapi HOT 2
- Fetch both headers at data in the same request HOT 4
- How to post raw data as JSON HOT 2
- Do you support HTTP/2 PUSH ?
- add retry feature HOT 3
- Graphql support HOT 1
- Caching HOT 3
- app is crash when open HOT 2
- Add PATCH HTTP method HOT 3
- how to apply global headers? HOT 2
- Impossible to add data in body in middleware.
- How to know if cache is returned
- json() undefined when rawData is true HOT 1
- updating cache on referch with disableCache: true
- Process responses through middlewares HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apipeline.