Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
544 views
in Technique[技术] by (71.8m points)

web scraping - Result RestClient call in NET Framework vs NET Core

I am trying to scrape a website. In the first step, I try to import the curl bash command and run it in postman. This works perfectly and it gives me a response in json format. The next step is I copy the generated code in C# to create a test console app in NET Framework to get the same response of my request. Unfortunately the response is {status: 'ok', error: 'true'}.

On the other hand I have created a test console app in Net Core and copied the same code generated in Postman ("RestClient"). Magically this is working and giving me a response with data in the app.

Does anybody know what's actually happening and how can I run the same code in a NET Framework program?

Thanks.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...