Bug 65274 - Generated HTTP sampler from cURL does not add data in corresponding tabs
Summary: Generated HTTP sampler from cURL does not add data in corresponding tabs
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: PC
: P2 normal (vote)
Target Milestone: JMETER_5.5
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-28 14:32 UTC by eR@SeR
Modified: 2021-04-28 14:32 UTC (History)
0 users



Attachments
generated cURL (119.19 KB, application/x-zip-compressed)
2021-04-28 14:32 UTC, eR@SeR
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eR@SeR 2021-04-28 14:32:04 UTC
Created attachment 37840 [details]
generated cURL

Hello,

When following cURLs are pasted into "Import from cURL" in JMeter, HTTP Sampler's data is successfully generated, but inside wrong tabs:

cURL example - Content-Type: application/x-www-form-urlencoded:

curl --location --request POST 'http://example.com/access/token' \
--header 'HTTP_X_FORWARDED_FOR: 127.0.0.1' \
--header 'Accept-Language: it-IT' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=test'

Parameter name and value are generated inside the Value column like "username=test", instead of being properly put to Name and Value columns inside the Parameters tab.

-----------------------------

cURL example - Content-Type: application/json:

curl --location --request POST 'http://example.com/api/email' \
--header 'Accept-Language: it-IT' \
--header 'HTTP_X_FORWARDED_FOR: 127.0.0.1' \
--header 'Content-Type: application/json' \
--data-raw '{"oldEmail":"oldemail@example.com","newEmail":"newemail@example.com","applicationTypeId":1}'

JSON is generated inside the Value column like "{"oldEmail":"oldemail@example.com","newEmail":"newemail@example.com","applicationTypeId":1}", instead of being put inside the Body tab.

Check the attached images for more information.

Jmeter 5.5 5f5b816
Microsoft Windows 10 Enterprise 64-bit
java version "15.0.1" 2020-10-20