Bug 65274

Summary: Generated HTTP sampler from cURL does not add data in corresponding tabs
Product: JMeter - Now in Github Reporter: eR@SeR <nalexic>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: Nightly (Please specify date)   
Target Milestone: JMETER_5.5   
Hardware: PC   
OS:    
Attachments: generated cURL

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
Comment 1 The ASF infrastructure team 2022-09-24 20:38:22 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5528