[Progress Communities] [Progress OpenEdge ABL] Forum Post: Using NameValueCollection and webClient

Status
Not open for further replies.
G

goo

Guest
11.7 Why do I get an array error doing this? wcURI = NEW System.Uri(cTokenEndpoint). wc = NEW System.Net.WebClient(). oParameters = New System.Collections.Specialized.NameValueCollection(). oParameters:ADD("client_id",'oidc_ovf_conf'). oParameters:ADD("grant_type",'authorization_code'). /* oParameters:ADD("code",cCode). */ /* oParameters:ADD("redirect_uri",URL-ENCODE(cRedirectURL,'query')).*/ PUT-STRING(rawAuth,1) = cClientid + ':' + cClientSecret. lcBASE64Auth = BASE64-ENCODE(rawAuth). wc:Encoding = System.Text.Encoding:UTF8. wc:Headers:Add("Content-Type", "application/x-www-form-urlencoded"). wc:Headers:Add("Authorization", "Basic " + lcBase64Auth). // lcResponse = wc:UploadString(wcURI,'POST',cParamList). lcResponse = wc:UploadValues(wcURI,'POST',oParameters). <------------------------------ this gives me an error saying that it did not expect an array…. Syntax check: An array was specified in an Expression, on the right-hand side of an assignment, or as a parameter when no array is appropriate or expected (361) It seems to be correct syntax regarding Microsoft.... what am I doing wrong? UploadValues(Uri, String, NameValueCollection) Uploads the specified name/value collection to the resource identified by the specified URI, using the specified Method.

Continue reading...
 
Status
Not open for further replies.
Top