2015-10-07 16:46:03 -07:00
|
|
|
---
|
|
|
|
title: JSONP
|
|
|
|
menu:
|
2015-10-08 13:54:31 -07:00
|
|
|
side:
|
2015-10-07 16:46:03 -07:00
|
|
|
parent: recipes
|
2015-10-08 13:54:31 -07:00
|
|
|
weight: 6
|
2015-10-07 16:46:03 -07:00
|
|
|
---
|
|
|
|
|
|
|
|
JSONP is a method that allows cross-domain server calls. You can read more about it at the JSON versus JSONP Tutorial.
|
|
|
|
|
2015-10-07 17:04:51 -07:00
|
|
|
### Server
|
2015-10-07 16:46:03 -07:00
|
|
|
|
|
|
|
`server.go`
|
|
|
|
|
2015-10-08 13:54:31 -07:00
|
|
|
{{< embed "jsonp/server.go" >}}
|
2015-10-07 16:46:03 -07:00
|
|
|
|
2015-10-07 17:04:51 -07:00
|
|
|
### Client
|
2015-10-07 16:46:03 -07:00
|
|
|
|
|
|
|
`index.html`
|
|
|
|
|
2015-10-08 13:54:31 -07:00
|
|
|
{{< embed "jsonp/public/index.html" >}}
|
2015-10-07 16:46:03 -07:00
|
|
|
|
2015-10-07 17:04:51 -07:00
|
|
|
### Maintainers
|
2015-10-07 16:46:03 -07:00
|
|
|
|
2015-10-08 13:54:31 -07:00
|
|
|
- [willf](https://github.com/willf)
|
2015-10-07 16:46:03 -07:00
|
|
|
|
2016-01-09 09:44:18 -08:00
|
|
|
### [Source Code](https://github.com/vishr/recipes/blob/master/echo/recipes/jsonp)
|