![]() ![]() The stream, it looks to me like you actually want to get the response and but that's what calling GetRequestStream isįor, providing body data for the request. I test your code and modify in some places, and don't find unauthorized error.ĭon't get the request stream, quite simply. ObjReader = New StreamReader(objResponse.GetResponseStream()) ObjResponse = DirectCast(myRequest.GetResponse(), HttpWebResponse) OrigResponse = DirectCast(origRequest.GetResponse(), HttpWebResponse)ĭim myRequest As HttpWebRequest = DirectCast(HttpWebRequest.Create(""), HttpWebRequest) ("Authorization", "Basic c3NhX2RzdDpBc3AzY3RfMTIzNA=")ĭim Stream As Stream = origRequest.GetRequestStream() The end goal is to download a file from theĭim origRequest As HttpWebRequest = DirectCast(HttpWebRequest.Create(""), HttpWebRequest) I'm connecting to a URL and the vendor tells me that when I connect the first time, I'll get an unauthorized error then I need to submit another request to download a file. I'm having troubles getting my REST API call to work. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |