2016-10-20 20:30:53 +02:00
|
|
|
+++
|
2016-11-17 08:46:00 +02:00
|
|
|
title = "JSONP Example"
|
|
|
|
description = "JSONP example for Echo"
|
2016-10-20 20:30:53 +02:00
|
|
|
[menu.side]
|
|
|
|
name = "JSONP"
|
|
|
|
parent = "recipes"
|
|
|
|
weight = 6
|
|
|
|
+++
|
|
|
|
|
|
|
|
JSONP is a method that allows cross-domain server calls. You can read more about it at the JSON versus JSONP Tutorial.
|
|
|
|
|
2016-11-17 08:46:00 +02:00
|
|
|
## Server
|
2016-10-20 20:30:53 +02:00
|
|
|
|
|
|
|
`server.go`
|
|
|
|
|
|
|
|
{{< embed "jsonp/server.go" >}}
|
|
|
|
|
2016-11-17 08:46:00 +02:00
|
|
|
## Client
|
2016-10-20 20:30:53 +02:00
|
|
|
|
|
|
|
`index.html`
|
|
|
|
|
|
|
|
{{< embed "jsonp/public/index.html" >}}
|
|
|
|
|
2016-11-17 09:05:37 +02:00
|
|
|
## [Source Code]({{< source "jsonp" >}})
|
|
|
|
|
2016-11-17 08:46:00 +02:00
|
|
|
## Maintainers
|
2016-10-20 20:30:53 +02:00
|
|
|
|
|
|
|
- [willf](https://github.com/willf)
|