We have IBM cloud function API which accepts filename as a parameter. If I give filename which includes + or non english characters(chinese,japanese, etc) the api is returning 404 with message:"Error: Whoops. Verb not supported." Please can you help me on this.
Asked
Active
Viewed 425 times
1 Answers
0
"Error: Whoops. Verb not supported."
This response from APIConnect when you consume the API implies Invoke action is not happening, that means input parameters are not as per expectation.
The backend of API Connect of every action in Assembly section is developed on JS and XSLT. Mainly for INVOKE action, it uses the concept of OpenURL to invoke the backend REST service.
From my understanding, JS will accept non-English and "+" operators but it will be part of the string - what I mean is this will not concat two strings.
Please try to drag "Gateway" action to the policy and execute the command
console.error("Input Req ::"+apim.getvariable('request.verb'));
Please share the response what you get in the DataPower gateway for this invoke.
-
When i added + in parameter value, I got below details from logs. It wont call Action, so not getting in action logs. – pallavi patil Oct 17 '18 at 07:56
-
May I know where to add this console.error? in cloud function action I added but its not there in log – pallavi patil Oct 17 '18 at 08:02
-
Part of log response: "request_method_str": "GET", "ALCH_TENANT_ID": "735a030f-fae4-4f29-9d0e-d73d7258f8bc", "request_protocol_str": "HTTP/1.0", "_type_str": "apigateway", "logmet_cluster": "topic2-elasticsearch_2", "request_uri_str": "/api/a1357f44564ab3bac94a249e62583efc9c0abe0bcff9fd55ec2cb066fe7a9cb5/v1/adopters/drupal/assets/upload/1+23/name/test.pdf", "apiKey_str": "-", "hr_str": "-", "@version": "1", "analyticsUri_str": "/v1/adopters/drupal/assets/upload/1+23/name/test.pdf", – pallavi patil Oct 17 '18 at 08:05
-
Which mean, "+" is accepted by API connect gateway since we can see in the request object. Please check with the backend is it acceptable or not. I suspect backend is not accepting the "+". Please try to invoke the backend system with postman or some other client code for better identification, – Srikanth Pragallapati Oct 22 '18 at 13:26