Skip to content

feat(core): specify a Content-Type for individual values when building a formdata request#3316

Merged
hassy merged 4 commits intoartilleryio:mainfrom
RikdeVos:feat/support-formdata-content-type
Aug 20, 2024
Merged

feat(core): specify a Content-Type for individual values when building a formdata request#3316
hassy merged 4 commits intoartilleryio:mainfrom
RikdeVos:feat/support-formdata-content-type

Conversation

@RikdeVos
Copy link
Contributor

@RikdeVos RikdeVos commented Aug 20, 2024

Description

Based on this discussion: #3315

Support contentType when building a request with formData. Example:

- post:
    name: Post activity
    url: /climate
    formData:
      activity: '{{ activity }}'
      type: '{{ type }}'
      photo:
        fromFile: './photo.png'
      climate:
        value: '{"temperature": "{{ climate.temperature }}", "unit": "{{ climate.unit }}"}'
        contentType: application/json
    expect:
      - statusCode: 201

TODO

  • update docs.

Pre-merge checklist

This is for use by the Artillery team. Please leave this in if you're contributing to Artillery.

  • Does this require an update to the docs?
  • Does this require a changelog entry?

@CLAassistant
Copy link

CLAassistant commented Aug 20, 2024

CLA assistant check
All committers have signed the CLA.

@hassy
Copy link
Member

hassy commented Aug 20, 2024

thank you @RikdeVos! we'll review shortly

@hassy
Copy link
Member

hassy commented Aug 20, 2024

(failing tests are as expected & due to a secret not being passed in to the job because of security settings in GHA)

@hassy hassy merged commit 311d76d into artilleryio:main Aug 20, 2024
@RikdeVos
Copy link
Contributor Author

Thanks for the quick review @hassy ! Much appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants