D
D
Denis Bukreev2016-10-12 20:24:02
Backend
Denis Bukreev, 2016-10-12 20:24:02

How js framework accepts data via api from php framework?

So it goes.
Suppose there is a backend on Laravel at api.project.com
And there is a frontend - project.com - for example, on ReactJS
What is the data transfer mechanism? I don't understand this at all. Magic?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
_
_ _, 2016-10-12
@AMar4enko

With the help of https://developer.mozilla.org/en-US/docs/Web/API/X...
Only the thrill-seekers use it raw. The rest use wrappers.
Axios and superagent are popular in ReactJS

X
xmoonlight, 2016-10-12
@xmoonlight

A normal ajax request with the right method and all the necessary headers.
For example api.jquery.com/jquery.ajax

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question