Networking Flashcards
Networking:
What is CORS (cross origin resource sharing)
Selectively unblock cross domain data (get data from two websites) different origins
Networking:
What is the header for CORS
Access-Control-Allow-Origin:domian.com
Networking:
Access-Control-Allow-Origin:domian.com
what does the called domain have to be
The same domain as the origin
Networking:
Access-Control-Allow-Origin:*
What does the star mean?
Anyone can us the info from that domain
Networking:
Access-Control-Allow-Origin:domian.com
Is the response or request being block if the domains don’t match?
response being blocked
Networking:
Access-Control-Allow-Origin:domian.com
This doesn’t block for
Puts
Posts
Deletes
Only blocking response
Networking:
Request a Put from another domain
Pre flight options
Access-Control-Request-Method;PUT
Networking:
JSONP only works with what type of requests
GET
Networking:
What two JSONP good for
1) Simple Requests
2) Easy to use
Networking:
What does JSONP return
It returns a json file wrapped in a function.
adamFunction ( [ "id":1, "first: "adam", "last": "Cadieux" ] );
How does JSONP get around cross origin problem
by just calling a script
What does CORS stand for?
cross origin resource sharing
What header is always sent by the browser on a CORS request?
Origin
What header needs the be present on a CORS response to a GET request for the browser to allow a request to pass through?
Access-Control-Allow-Origin
If we were making a POST CORS request, what HTTP request does the browser send first?
Options
“pre-flight” options request first to check to see if it can send a POST request later on