ane1990 commented on issue #148:
URL: https://github.com/apache/openserverless/issues/148#issuecomment-3268988230
hi @94lama ,
i was able to test the app deploying this action 'wsgi-test' under mastrogpt
package, using this snippet:
```
#--docker registry.hub.docker.com/94lama/openserverless-runtime-python:latest
#--web true
import json
from flask import Flask, request
from hello import hello
app = Flask(__name__)
@app.route("/")
def home():
return "Hello, world!"
@app.route("/hello")
def salute():
return hello()
@app.route("/post", methods=["POST"])
def post():
return json.dumps(request.json)
@app.route("/test")
def test():
name = request.args.get("name", "No name")
return f"Test: {name}"
```
some results from my tests:
GET https://aanelli.openserverless.dev/api/my/mastrogpt/wsgi-test/ -> **test
ok**
GET https://aanelli.openserverless.dev/api/my/mastrogpt/wsgi-test/hello ->
**test ok**
GET https://aanelli.openserverless.dev/api/my/mastrogpt/wsgi-test/test ->
**test ok**
GET
https://aanelli.openserverless.dev/api/my/mastrogpt/wsgi-test/test?name=alberto
-> *test ok**
GET
https://aanelli.openserverless.dev/api/my/mastrogpt/wsgi-test/test?name=pippo->
**test KO, receiving old value 'alberto' from prev request**
POST https://aanelli.openserverless.dev/api/my/mastrogpt/wsgi-test/post -->
**test KO method not allowed **
`curl --location --request POST
'https://aanelli.openserverless.dev/api/my/mastrogpt/wsgi-test/post'`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]