abbas-oveissi / moviesapi_ir Goto Github PK
View Code? Open in Web Editor NEWSource to www.moviesapi.ir
Source to www.moviesapi.ir
I want to register a user but when I call the register API I get the following error?
Access to fetch at 'https://moviesapi.ir/api/v1/register' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
this is my code :
const endpoint = "https://moviesapi.ir/api/v1/register"
const data = {
email: "[email protected]",
password: "Ar2480014037",
name: "abolfazl"
}
fetch(endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=utf-8'
},
body: JSON.stringify(data)
})
.then(resposne => resposne.json())
.then(result => {
console.log(result)
})
.catch(error => {
console.log(error)
})
How can I solve this problem?
Thanks in advance
Hi
Calling apis not working. e.g https://moviesapi.ir/api/v1/movies?page=1
In movies list api site, Vazir font doesn't load because its css file gets 404 not found.
I find that in www.moviesapi.ir/vendor there is no Vazir font file, but there is IranSans.
So I can change the website font to IranSans and send a pull request if you want.
Hi , I was just trying to use this api in flutter and faced to String casting to int error
and after some debugging i found out that The api return current_page = "2" in this request response http://moviesapi.ir/api/v1/movies?page=2
like that metadata":{"current_page":"2","per_page":10,"page_count":25,"total_count":250}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.