-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Url with a space or special characters #9
Comments
hmn, Uri.EscapeUriString("https://api-content.meocloud.pt/1/Metadata/meocloud/nova com espaco/") |
That was my first attempt :( client = OAuthUtility.CreateOAuthClient(ConsumerKey, ConsumerSecret, new AccessToken(AccessToken, AccessTokenSecret)); HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, new Uri(Uri.EscapeUriString("https://api-content.meocloud.pt/1/Metadata/meocloud/nova com espaco/"), UriKind.RelativeOrAbsolute)); (I hard coded the url for demostration purpose... ) |
たぶん同じことが起きて、現物合わせで直ってるっぽくなったのでこちらに書かせていただきます。 でいけない原因は リクエストするurl(パラメーター) OAuthMessageHandlerのSendAsyncオーバーライドのHttpRequestMessage OAuthUtility.GenerateSignatureのuriパラメーター Utility.ParseQueryStringのqueryパラメーター と、原因が掴めたけど理由がまだ判っていません。 以下のように変更したら動作したので暫定対策としました。
|
I'm using the library with success , but if my Url has a space or a special character then my API provider gives me an unautorized
https://api-content.meocloud.pt/1/Metadata/meocloud/novapasta
OK
https://api-content.meocloud.pt/1/Metadata/meocloud/nova com espaco/
NOK - UNAUTHORIZED
https://api-content.meocloud.pt/1/Metadata/meocloud/cão/
The text was updated successfully, but these errors were encountered: