Closed mwakao closed 7 years ago
seems like @germanattanasio already opened an issue a long time ago about this https://github.com/square/okhttp/issues/1976
I think https://github.com/square/okhttp/issues/1976 was a problem of okhttp3.HttpUrl#uri() . Now uri() method escapes '|'. That's fine now.
com.ibm.watson.developer_cloud.http.RequestBuilder that constructs URL in Watson SDK uses okhttp3.HttpUrl#url() method that doesn't escape '|' character. That may cause this problem.
See https://square.github.io/okhttp/3.x/okhttp/okhttp3/HttpUrl.html for more detail for the difference between uri and url method.
So, I think there are inconsistency between SDK implementation and Service implementation. SDK uses url() method that is less strict than uri(), but service side requires strict one. I think the same version of SDK worked fine with the discovery service until February, so service side changed something at the time.
The following code using Discovery service Java Client API fails with error. If I change the query to just "author", it works fine.