0
sendgrid의 웹 API를 사용하려고합니다. 그것을 사용하려면, 당신은 어떻게 저를 혼동하는 파일의 부분이http로 파일을 보내려면 C# 코드로 요청을 받으시겠습니까?
sendgrid.com/api/mail.send.json?to=example%40exaple.com&from=example%40example&subject=Subject&text=Body&files=files%5Bfile1.doc%5D%3Dexample.doc%26files%5Bfile2.pdf%5D%3Dexample.pdf&api_user=usnermae&api_key=apikey
처럼 보이는 URL에 GET 요청을 수행
C# 코드에서&files=files%5Bfile1.doc%5D%3Dexample.doc%26files%5Bfile2.pdf%5D%3Dexample.pdf&api_user=usnermae&api_key=apikey
, 어떻게 파일을 줄 것이라고 I 스트림이나 바이트 []를 URL에 가지고 있습니까?
이것은 결국 요청을 수행하는 방법입니다.
using (WebClient client = new WebClient())
{
string text = client.DownloadString(url);
}
이것은 지금까지 제대로 작동하며 첨부 파일을 제외한 모든 프로그램이 준비되어 있습니다. 요청을 받기 위해 파일을 URL로 가져 오는 방법에 대해 올바른 방향을 알려줄 수 있습니까?