Giter Site home page Giter Site logo

httpclientmultipart's Introduction

Upload/Download Files Using HttpClient in C#

In this new post, I show you how to upload/download files using HttpClient in C# and .NET Core. Creating a new version of the Markdown Editor component for Blazor, I face some issues with the file upload. So, I was working to find a solution and now I can tell you how to do it.

First, I will take a look at how to send multipart MIME data to a Web API using HttpClient. We will create two applications to demonstrate the data transfer between the client side and the server side. The server-side app is an ASP.NET Core web project, which includes a Web API controller for uploading and downloading files. The client-side app is a Console project, which contains a Typed HttpClient to send HTTP requests for file uploading and/or downloading.

The full explanetion of the code is in this post on PureSourceCode.

httpclient

httpclientmultipart's People

Contributors

erossini avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

httpclientmultipart's Issues

Inquiry Regarding Repository Usage for Efficient Download of Small Files in .NET

0

I am writing to inquire about the suitability of your GitHub repository for a specific use case.

I am interested in using your repository to download multiple small files concurrently. The files I need to download are relatively small, ranging from 2KB to 5.6KB. I anticipate having up to 50 URLs, though typically no more than 15. The frequency of downloads varies throughout the day, with some periods having only 1 or 2 URLs, and occasionally none at all.

The URLs resemble the following examples: http://worldtimeapi.org/Europe/London http://worldtimeapi.org/Europe/Berlin ......

These URLs represent endpoints that provide JSON data, and I need to download them quickly and efficiently, I also have to use Newtonsoft.json to parse the json format string get the necessary information. I plan to implement this functionality in C# using .NET 8.0 and Visual Studio 2022 on Windows 10.

Could you kindly confirm if your repository supports this use case? Additionally, if it does, I would greatly appreciate some general instructions on how to effectively leverage your repository for this purpose.

Thank you for your time and assistance. I look forward to your guidance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.