wso2isbest
wso2isbest

Reputation: 85

How to set x-www-form-urlencoded parameters in WSO2 API Manager?

I have an API Which Takes x-www-form-urlencoded Values in Parameters. Its Working Fine in Postman but I don't Know How to Set It in WSO2.

Here is My API in Postman. In Body Section I Send Data with Content/Type: x-www-form-urlencoded .This Encodes the values of keys. but I did not see such thing in WSO2.

enter image description here How can I fix it? Thanks

Upvotes: 1

Views: 869

Answers (1)

Vithursa Mahendrarajah
Vithursa Mahendrarajah

Reputation: 1224

If the deployed API is based on OAS 3.x, you can edit the API Definition by following the steps given below:

  1. Login to the Publisher Portal (by browsing https://<host>:<port>/publisher)
  2. Select the particular API
  3. Navigate to the API Definitions section
  4. Edit the relevant resource as mentioned below:
  /getorder:
    post:
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                orderid:
                  type: string
                passengerid:
                  type: string
                ordercode:
                  type: string
  1. Save the changes
  2. Now if you try to invoke the API from DevPortal, it will prompt for the fields as shown below:

enter image description here

Upvotes: 1

Related Questions