How to handle content-length header in wso2 api manager

Viewed 53

currently i am using API Manager 4.0

If there is a content-lengh header in the Post Method, how can I set it up and test the API in the "try out" tab? I need help.


method: POST
url: http://apihostip/GetPut?TYPE=GET&CLA=STRK
content:
:HEADER
TABLE=VERSION
VERSION
STRING
1.00
TABLE=VALID_OPER
SERIAL_NUM
STRING
ABCDEDF



But when try it out, come out the 411 error

Thanks.

1 Answers

From the API Publisher you can add a header to the resource.

  1. Go to the API and click API Configurations under Develop section.
  2. Click on the Resources.
  3. Go the resource and add parameters.
  4. From the parameters, click the Header type and fill the rest.
  5. Deploy the API.
  6. When you are trying out the API from the Swagger UI, it shows the header and you can provide any value to that header.

enter image description here

Related