Comments (4)
@KarisD Glad you're liking the API! All endpoints should have the necessary CORS headers, so you may want to check your client configuration. If you're not able to resolve the issue on your end, feel free to send me the relevant code snippet, and I'll see if I can point you in the right direction.
from mhwdb-docs.
Hey! Still not sure what I'm doing wrong. It's a React app, here is my code. I call this method when loading components to the UI.
export function fetchWeapons() {
return dispatch => {
dispatch(fetchWeaponsBegin());
return fetch("https://mhw-db.com/weapons")
.then(handleErrors)
.then(res => res.json())
.then(json => {
dispatch(fetchWeaponsSuccess(json));
return json;
})
.catch(error => dispatch(fetchWeaponsFailure(error)));
};
}
The fetch will work with armor
but doesn't for weapons
. I'll keep researching, but if anything sticks out to you, let me know.
Thanks!
from mhwdb-docs.
Your code looks fine, so just in case, I went and cleared out the Cloudflare cache. I'm wondering if maybe it's just some weirdness with how that endpoint got cached. Make sure you clear your browser's cache before trying again, and please let me know if it continues to happen.
from mhwdb-docs.
@LartTyler Hey, that did the trick. Tried it again before clearing browser cache and it worked. Thanks for your help!!
from mhwdb-docs.
Related Issues (20)
- Dragon Resistance Skill modifiers for resistDragon missing HOT 1
- Issue with Fire and Ice (dual blades) HOT 6
- Resource slug problem HOT 5
- Kulve Taroth updated equipment HOT 2
- Server currently down HOT 1
- $like query can't find Beta armors HOT 2
- Is it possible to combine query with projection? HOT 2
- Monster Pictures/Symbols HOT 7
- Iceborne HOT 2
- Diablos Wall 2 type HOT 1
- Weapon types & Affinity HOT 3
- Retrieve API version HOT 8
- Errors in some armor data HOT 1
- Some monsters not returning any rewards HOT 6
- Many Missing Ammo Types in Documentation HOT 2
- No Event rewards HOT 2
- Incorrect Table Formatting for Weapon Shelling Type
- iceborne monster data not complete HOT 3
- Large Queries Deliver Partial JSON HOT 2
- No base game or Iceborne Story quests or investigations
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 mhwdb-docs.