webrequest- все статьи тега ➜ страница 0


Загрузка изображения с помощью C# и WebRequest?

Вот рабочий код на Python (с использованием cURL): #!/usr/bin/python import pycurl c = pycurl.Curl() values = [ ("key", "YOUR_API_KEY"), ("image", (c.FORM_FILE, "file.png"))] # OR: ("image", "http://example.com/example.jpg"))] # OR: ("image", "BASE64_ENCODED_STRING"))] c.setopt(c.URL, "http://imgur.com/api/upload.xml") c.setopt(c.HTTPPOST, values) c.perform() c.close() Вот что у меня есть в C#: public void UploadImage() { //I think this line is d ...