U
U
Uncle Seryozha2015-08-22 23:43:50
In contact with
Uncle Seryozha, 2015-08-22 23:43:50

How to URL encode "+" character for VK API execute in C#?

I want to execute the code, but the "+" symbol is not transmitted...
I send it like this:

string code = ....;
string reqStr = string.Format(
                        "https://api.vk.com/method/execute?access_token={0}&code={1}&version=5.37", ACCESS_TOKEN,code);
                    WebClient webClient = new WebClient();
                    string photocount = webClient.DownloadString(reqStr);//количество фото в альбоме группы

The code itself (code):
var photos = API.photos.get({"owner_id":-35001375,"album_id":"210619562"}).items;
var offset = 1000;
while (offset < 20001)
{
photos=photos+ API.photos.get({ "owner_id":-35001375,"album_id":"210619562","offset":offset}).items;
offset = offset+1000;
}
return photos;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Wolf, 2015-08-23
@Protos

https://msdn.microsoft.com/en-us/library/system.we...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question