You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am from Spinnaker community. We have recently migrated some of our services from retrofit1 to retrofit2. We have hundreds of apis overall.
After migration we are facing challenges with path parameter encoding.
With retrofit1, the path param [foo] b:ar (baz) used to be encoded to %5Bfoo%5D%20b%3Aar%20%28baz%29 and api has no issues.
But after migrating to retrofit2, the encoded value became [foo]%20b:ar%20(baz) and api rejects it with 400.
Is there any plan to fix this issue? What is the work around you suggest?
The text was updated successfully, but these errors were encountered:
So we are not required to encode parenthesis, but are supposed to encode square brackets.
However, this behavior is inherited from OkHttp which current does not encode square brackets per square/okhttp#6790. Since we are built OkHttp, we inherit its behavior. Now technically that's not true for path encoding as we copy OkHttp's implementation, but otherwise use its HttpUrl.Builder to construct HTTP URLs. The illusion is that we use OkHttp's HttpUrl.Builder for everything, however, so I would prefer to align with its behavior.
Perhaps you could plead your case on their issue, and then once OkHttp changes we will change as well.
I am from Spinnaker community. We have recently migrated some of our services from retrofit1 to retrofit2. We have hundreds of apis overall.
After migration we are facing challenges with path parameter encoding.
With retrofit1, the path param
[foo] b:ar (baz)
used to be encoded to%5Bfoo%5D%20b%3Aar%20%28baz%29
and api has no issues.But after migrating to retrofit2, the encoded value became
[foo]%20b:ar%20(baz)
and api rejects it with 400.Is there any plan to fix this issue? What is the work around you suggest?
The text was updated successfully, but these errors were encountered: