WebConsumer.PrepareAuthorizedRequest Params with the same names

160 views
Skip to first unread message

Gennadii Omelchenko

unread,
May 7, 2012, 10:02:20 AM5/7/12
to DotNetOpenAuth
Hello!

I've recently faced some problems working with LinkedIn.

What I'm doing is getting updates from the LinkedIn, and I'm expected
to pass them several params (named 'type') within the same url in
order to get results.
In order to achieve proper encoding, I decided to use an overload of
the WebConsumer.PrepareAuthorizedRequest which takes a dicitonary for
extra data. Obviously, I got en error indicating I couldn't have
several keys with the same name within the dictionary.

Is there any other way to pass several params to the request, still
having those params properly encoded?

Thanks!

Andrew Arnott

unread,
May 7, 2012, 8:14:28 PM5/7/12
to dotnet...@googlegroups.com
I'm afraid you've hit a limitation in DotNetOpenAuth due to its use of Dictionary instead of NameValueCollection.  You can only have one parameter per name.  Now, I believe if you just have one type parameter with a comma-delimited list as its value that some services will interpret that as equivalent to multiple type parameters.  You can try it against LinkedIn to see whether that works.
--
You received this message because you are subscribed to the Google Groups "DotNetOpenAuth" group.
To post to this group, send email to dotnet...@googlegroups.com.
To unsubscribe from this group, send email to dotnetopenid...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dotnetopenid?hl=en.



--
--
Andrew Arnott
"I [may] not agree with what you have to say, but I'll defend to the death your right to say it." - S. G. Tallentyre

Gennadii Omelchenko

unread,
May 8, 2012, 2:02:40 AM5/8/12
to DotNetOpenAuth
Thanks! I wish LinkedIn could do this, but... It had been better if I
had chosen other library :(
Reply all
Reply to author
Forward
0 new messages