why is Apigee truncating ? from request url

When I send the below request url, Apigee truncates the ? from the url automatically and request passes through. Need to understand if this is expected behavior?

url: http://myorg-test.apigee.net/weather/v1.1/places?

I have a validation mechanism which uses request.uri value to see if any ? is there and if it is there in uri then request will fail. Since Apigee truncates the ? automatically this logic never gets executed.

Appreciate the early response. Thanks!

Solved Solved
0 6 354
1 ACCEPTED SOLUTION

Yes, Apigee truncates ? if no query param is present. Deafault behavior.

View solution in original post

6 REPLIES 6

hi @Mathanprasath k - would it be possible to share your bundle ?

@Sai Saran Vaidyanathan

Thanks for the reply.I can't share the bundle as it's specific to a Project.

sydub7
Participant IV

It appears if you do not attach query params after ? in the URL, Apigee default behavior is to truncate ? (if request is coming from browser / postman) and generates an error when using trace tool. Attached is the screenshot. screen-shot-2017-11-21-at-55607-pm.png

Thanks @Syd . Yes, Apigee truncates ? if no query params defined.

The ? character by itself cannot be treated as input. A more acceptable approach is to check for presence of any query parameter or add a query parameter that reflects your problem domain.

example:

default=yes

Yes, Apigee truncates ? if no query param is present. Deafault behavior.