简体   繁体   中英

Azure Function App Illegal character in query

I am creating an function app for the specific purpose of getting information from Ebay and passing it elsewhere. Ebay will be redirecting a user to this app with a code parameter but because of the format of it, I am getting failures.

An example of what they send me is: http://localhost:7071/api/EbayRedirectOAuth?code=v^1.1#i^1#f^0#p^3#r^1#I

Then when I try to get the query parameter all I get is "v^1.1". I thought that maybe it just isn't saving the parameter correctly so I'll just get the whole URI. When I try that, I get this error:

Executed 'Functions.EbayRedirectOAuth' (Failed, Id=8bb42bf4-ca21-463e-83a8-2cc274b5d419, Duration=97ms) [2021-11-12T19:05:31.459Z] System.Private.CoreLib: Exception while executing function: Functions.EbayRedirectOAuth. System.Private.CoreLib: Result: Failure Exception: URISyntaxException: Illegal character in query at index 50: http://localhost:7071/api/EbayRedirectOAuth?code=v^1.1 Stack: java.lang.reflect.InvocationTargetException

I cannot change what Ebay is sending me so I have to somehow deal with it in the function app. Is there anything I can do to make this work?

Looks like this was a frustrating non-issue. A few hours after I deployed my app and just left it alone, I came back to it and tried again. The new url that Ebay used was encoded and my app worked as expected. Don't know why they had it sending un-encoded at first but it works now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM