Git Product home page Git Product logo

Comments (7)

hassy avatar hassy commented on June 11, 2024 1

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.

jwingo1015 avatar jwingo1015 commented on June 11, 2024

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.

hassy avatar hassy commented on June 11, 2024

@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.

jwingo1015 avatar jwingo1015 commented on June 11, 2024

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.

hassy avatar hassy commented on June 11, 2024

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.

jwingo1015 avatar jwingo1015 commented on June 11, 2024

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.

hassy avatar hassy commented on June 11, 2024

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)

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.