Git Product home page Git Product logo

Comments (5)

bbangert avatar bbangert commented on June 2, 2024

So, just making sure I'm hearing this right. When you hit it with Firefox, you see the request on the server log, when you use the pyamf lib, the server shows no activity?

from pyramid_rpc.

nagyv avatar nagyv commented on June 2, 2024

yes, exactly this is what I see.

from pyramid_rpc.

bbangert avatar bbangert commented on June 2, 2024

Ok, I tested the gateway, and it seems to work. I did a simple setup with a test.py that looks like this:

import pkg_resources

from pyramid_rpc.amfgateway import PyramidGateway
from pyramid.config import Configurator
from paste.httpserver import serve

def echo(request, data):
    return data

services = {
    'myservice.echo': echo
    # could include other functions as well
}

echoGateway = PyramidGateway(services)

if __name__ == '__main__':
    config = Configurator()
    config.add_view(echoGateway)
    app = config.make_wsgi_app()
    serve(app, host='0.0.0.0', port=9090)

Then after running it with python test.py, I did this from the prompt:

from pyamf.remoting.client import RemotingService
url = 'http://127.0.0.1:9090/'
gw = RemotingService(url)
service = gw.getService('myservice')
service.echo('fred')

And it echo'd 'fred' back to me as expected. I'm guessing you're either not naming your service right, or naming the function right?

from pyramid_rpc.

nagyv avatar nagyv commented on June 2, 2024

my problem comes from using apex. I could not figure out the exact conditions, but will try to work on it more.

thx, for your quick responses.
I'll close this issue now.

from pyramid_rpc.

nagyv avatar nagyv commented on June 2, 2024

the issue was due to csrf validation in every POST-ed form, as implemented in apex

from pyramid_rpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.