Comments (7)
A couple of things:
First, the YAML doesn't look right, it should be something like:
- post:
url: "/some/url"
formData:
firstName: "Jerry"
lastName: "Winston"
headers:
authorization: "Bearer {{access_token}}"
(Btw you can use backticks to preserve formatting of the code, see the guide for details)
You don't need to specify content type and the boundary manually.
Second, is this a file upload form you're testing? Artillery doesn't support using external files for testing uploads so you'd have to embed the contents of the file directly into the test script.
from artillery-core.
Im don’t think a file upload is needed Let me try your solution
From: hassy veldstra
Reply-To: shoreditch-ops/artillery-core
Date: Wednesday, June 1, 2016 at 5:05 PM
To: shoreditch-ops/artillery-core
Cc: Justin Wingo, Author
Subject: Re: [shoreditch-ops/artillery-core] Not able to send Form Data with request (#59)
A couple of things:
First, the YAML doesn't look right, it should be something like:
- post:
url: "/some/url"
formData:
firstName: "Jerry"
lastName: "Winston"
headers:
authorization: "Bearer {{access_token}}"
You don't need to specify content type and the boundary manually.
Second, is this a file upload form you're testing? Artillery doesn't support using external files for testing uploads so you'd have to embed the contents of the file directly into the test script.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/59#issuecomment-223124556, or mute the threadhttps://github.com/notifications/unsubscribe/ARbAWhZ-egNRgpoMt8m9j9BBOcfwueasks5qHfQngaJpZM4IrjMj.
from artillery-core.
@jwingo1015 if it's not a file upload form, use form
instead of formData
.
Artillery uses request.js
under the hood, for more details on the distinction see this: https://github.com/request/request#forms
from artillery-core.
This is the message I’m receiving now with those changes:
"message":"The current request is not a multipart request
From: hassy veldstra
Reply-To: shoreditch-ops/artillery-core
Date: Wednesday, June 1, 2016 at 5:10 PM
To: shoreditch-ops/artillery-core
Cc: Justin Wingo, Mention
Subject: Re: [shoreditch-ops/artillery-core] Not able to send Form Data with request (#59)
@jwingo1015https://github.com/jwingo1015 if it's not a file upload form, use form instead of formData.
Artillery uses request.js under the hood, for more details on the distinction see this: https://github.com/request/request#forms
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/59#issuecomment-223125593, or mute the threadhttps://github.com/notifications/unsubscribe/ARbAWst_q8m1SpHeM8Ah8zQRDV1_D9LAks5qHfUogaJpZM4IrjMj.
from artillery-core.
Is that the message from the server? In that case the server is expecting a multipart/form-data
form so you should use formData
.
from artillery-core.
Now I’m receiving the following error message for the post request:
Either json or profile image is required
From: hassy veldstra
Reply-To: shoreditch-ops/artillery-core
Date: Wednesday, June 1, 2016 at 5:14 PM
To: shoreditch-ops/artillery-core
Cc: Justin Wingo, Mention
Subject: Re: [shoreditch-ops/artillery-core] Not able to send Form Data with request (#59)
Is that the message from the server? In that case the server is expecting a multipart/form-data form so you should use formData.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/59#issuecomment-223126860, or mute the threadhttps://github.com/notifications/unsubscribe/ARbAWuMNdgrWysFwS-dInm6onSoJo0Tsks5qHfY7gaJpZM4IrjMj.
from artillery-core.
That's not to do with Artillery now - you need to send the server the data that it expects to receive.
from artillery-core.
Related Issues (20)
- Feature Proposal: File Upload HOT 6
- Artillery does not return with certain malformed requests
- Artillery is connecting twice with socket.io HOT 14
- Known vulnerability in npm dependancy ws. HOT 2
- Known vulnerability in npm dependancy tough-cookie
- Question/bug?: customStats being overwritten HOT 1
- beforeReqeust's requestParams can't be customized. HOT 1
- Send binary packet through WS? HOT 1
- WS get received data? HOT 1
- Add socketio query param on connect event HOT 3
- Match json fails for numeric value
- Variables with 0 numeric value are always empty string
- Expose http response body to afterResponse HOT 2
- Socket.IO Engine - Emit Callback Data HOT 1
- Double send in socket.io engine HOT 3
- Add raw TCP socket engine
- [Feature Request] Add support for SignalR
- supporting multipart form data HOT 4
- Data got emit twice in socket.io engine HOT 2
- form not sending data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from artillery-core.