| 1 | import logging |
|---|
| 2 | logging.basicConfig(level=logging.DEBUG, |
|---|
| 3 | format='%(asctime)s %(levelname)-5.5s [%(name)s] %(message)s') |
|---|
| 4 | |
|---|
| 5 | from pyamf.remoting.client import RemotingService |
|---|
| 6 | |
|---|
| 7 | client = RemotingService('http://demo.pyamf.org/gateway/helloworld') |
|---|
| 8 | service = client.getService('echo') |
|---|
| 9 | |
|---|
| 10 | print 'Without referer:', service.echo('Hello World!') |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | client = RemotingService('http://demo.pyamf.org/gateway/helloworld', |
|---|
| 14 | referer='http://localhost/penis.py') |
|---|
| 15 | service = client.getService('echo') |
|---|
| 16 | |
|---|
| 17 | print 'With referer:', service.echo('Hello World!') |
|---|