-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POST request params issue #1
Comments
Weird, I was just about to ask a question about POST params myself :D I'm trying to POST a JSON payload, but I'm unclear on how to get mgun to do it. |
I tried something similar to config.yaml, still not working ... concurrency: 1
loopCount: 1
scheme: http
host: 127.0.0.1
port: 8000
debug: True
params:
search:
languages: [php, java, c++, c, go, golang, js]
structures: [for, while, class, if, else, case]
agent:
- Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.101 Safari/537.36 FirePHP/4Chrome
- Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36
- Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0
- Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0
say: hello world
session:
- login: user1
password: password1
friendIds: [1, 2, 3, 4]
- login: user2
password: password2
friendIds: [5, 6, 7, 8]
requests:
- POST: /index
param:
friend_id: ${session.friendIds}
say: ${say} and my server side is from flask import Flask, request
import simplejson
app = Flask(__name__)
@app.route('/index', methods=['POST'])
def test_api():
print(request.form)
return simplejson.dumps({"status":"success"})
if __name__ == '__main__':
app.run(host='0.0.0.0',port=8000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear byorty, your testing tool looks awesome, it doesn't go wrong until I change my config file to a POST request with params. I checked those requests send from mgun, they turn out to be empty requests. Do you known how to fix this?
Many thanks!
The text was updated successfully, but these errors were encountered: