Send 'form-data' as body in Karate framework feature file

652 views Asked by At

As part API Automation using karate framework, I am trying to send 'form-data' as body in karate feature file.

Please provide your solution with following example attached.enter image description here

I tried to call the get method with body as form-data using karate framework feature file.

Feature: Get API Background:

  • def data = """

    { "name":"tom", "email":"[email protected]", "gender":"male", "status":"active" }

    """

Scenario: get Auth details Given url 'https://demo.domain.com/ea80952e/oauth2/token' And request data When method GET Then status 200

1

There are 1 answers

0
uzair shahid On

You can use form-data like this:

And multipart field client_id = 76t775e676