Rust Axum Full Course - Web Development (GitHub repo updated to Axum 0.7)
Ғылым және технология
GitHub Repo updated to Axum 0.7. See commit: github.com/jeremychone-channe...
Rust Programming - Full Course for Axum: An Awesome Web Framework for Rust. Not too low-level, not too high-level, well-componentized, complete, and with great ergonomics.
GitHub Code: github.com/jeremychone-channe... (MIT or Apache 2.0, all free to use)
Big thanks to CrabNebula (crabnebula.dev/) for sponsoring this video.
Help support this channel: / jeremychone
IMPORTANT:
On *Windows* for the "link" file issue when running the cargo test and run in parallel. The solution is to move `tests/quick_dev.rs` to the `examples` folder, rename the function to `#[tokio::main]`, and it should allow you to do the following:
- In Terminal 1: `cargo watch -q -c -w src/ -x run`
- In Terminal 2: `cargo watch -q -c -w examples/ -x 'run --example quick_dev'`
(we will follow this scheme in the next videos)
Tech notes:
- `cargo install cargo-watch` - If you haven't already, make sure to install Cargo Watch.
- On Windows, there appears to be an issue when running two Cargo commands on the same project simultaneously. If you have a solution, please add a comment and I will include it here.
- Don't use `store: ... Vec` in production code, as it won't scale. It's just for this demo. I've created a new mock-store crate that handles this in a better way (for future videos).
Content:
- 00:00:00 - Intro
- 00:00:53 - Hello World Router
- 00:03:10 - Quick_Dev
- 00:06:21 - Hello Route - Query Params
- 00:08:51 - Hello Route - Path Param
- 00:11:15 - routes_static
- 00:13:37 - First LOGIN API
- 00:21:55 - Login Auth-Token Cookies
- 00:24:32 - Rest API - Mock Model/Store
- 00:32:30 - CRUD - REST API
- 00:40:12 - First Middleware - mw_require_auth
- 00:45:52 - require_auth - token parsing
- 00:49:13 - First Extractor - Ctx
- 00:54:01 - Ctx in mw_require_auth
- 00:56:29 - Ctx in the REST APIs
- 00:58:31 - mw_ctx_resolver
- 01:04:36 - Error Client & Server
- 01:12:42 - Server Log line
#RustProgramming #RustLang #WebDevelopment #completecourse
Jeremy Chone:
- Twitter - / jeremychone
- Discord General Rust - / discord
- Discord Awesome-App - / discord
- Patreon - / jeremychone
Next: In the next tutorial, we will build upon this course and lay the foundation for a real production app.
- Remove the demo content (hello/hello2, and REST Ticket) and do some cleanup.
- Refactor the model layer (still using a mock-store, but making the design more production-ready. We will have two entities `Task` and `User`).
- Implement multi-scheme password encryption (using a secret and user_pwd_salt, as well as a #scheme_id#encrypted format to allow seamless encryption scheme evolution).
- Implement Secure Web Token, (using a secret and `user_token_salt`).
- Use RPC (JSON-RPC) following the [joql.org](joql.org) notation.
Other popular Rust Programming videos:
- Rust Type State Builder Pattern - • Rust Programming: Type...
- Rust Builder Pattern - • Rust Programming: The ...
- Rust Builder Pattern - • Rust Programming: The ...
- Quick Start Code Layout - • Rust - Simple Code Lay...
- AWESOME-APP Full Overview - Rust template for building Awesome Desktop Application: • Building Awesome Deskt...
- Tauri Quick Introduction (Desktop App wit Rust Programming): • Rust Tauri 1.0 - Quick...
- Rust Web App tutorials series: • Rust Web App - 1/3 - D...
- Rust Bevy Full Tutorial - Game Development with Rust: • Rust Bevy Full Tutoria...
- Rust for Java Developers series: • Rust for Java Develope...
Playlists:
- Rust For Desktop App: • Rust Programming for D...
- Everything Rust Programming - Tutorials, Courses, Tips, Examples: • Everything Rust Progra...
- Rust Programming for Web Development: • Rust Programming for W...
AWESOME-APP ➜ awesomeapp.dev - Rust Templates for building awesome applications.
Rust AWESOME-APP GitHub - github.com/orgs/rust-awesome-...
Other notes:
- Tool used to do the green lines. ScreenBrush on Mac App Store (Gromit seems to be the equivalent on Linux)
- Edited with Davinci Resolve.
Пікірлер: 325
This is the only concrete evidence that I can find on the internet that actually shows people putting routes in something other than the main.rs file, THANK YOU
as a person who did few hundred apis in different languages and peeking into rust, i have to say this is top notch, up to the point, no bs tutorial covering exactly the things i was curious about, amazing work! thanks
@mixedproduce9787
3 ай бұрын
+100
GOAT OF ALL RUST CHANNELS OUT THERE ❤
Thanks for putting putting this together, really appreciate it. I'm struggling with understanding these frameworks and this helps immensely
I have been waiting for a tutorial from axum for so long. Thank you very much! Keep up the good work! :)
The work you do to teach us Rust with good practices is incredible. Thank you very much Jeremy.👍👌
Feeling really lucky to see this went out just as I decided to learn how to use Axum, especially with this level of quality! It's all very new to me but your explanations are perfectly clear and concise. Thanks a lot!
Thanks for this video! I'm really digging the casual code-along style combined with really excellent preparation from your side, it's clear in everything you say that you deeply understand the subject matter.
I just picked up learning rust again and this video was quiet a summary of a lot of rust features I had forgotten already. Great work!
Been waiting for this! Thank you!
Hi Jeremy, great tutorial. I have one suggestion: it would be helpful if, at the start of each step, you stated more explicitly what you want to achieve by the end of the step. You do this to some extent, but sometimes things only make sense in hindsight. Again, great tutorial!
@JeremyChone
8 ай бұрын
Good feedback, I will keep that in mind.
the quality of the production of this video is A++
You make your videos with a very good quality, 15 Minutes in and I am subscribed :)
I cannot even express how good this content is. Thank you! Can't believe this is free.
❤❤❤❤❤❤❤❤ raw content with so much to learn. I have axum servers, but the best practices you show in your videos make you unique
This has been amazingly helpful, thank you. I really appreciate how you have taken the many concepts that are documented but only to a shallow simplistic level, and shown how to put them together, in a way that is more similar to how you'd want in production. It bridges a knowledge gap that is very real for me.
Thank you so much for this great tutorial. The teaching pace is quite fast and it was no piece of cake to understand all the methods you use as a rust noob (I've only read "the book", so sometimes, I was wondering "why does he uses as_ref() instead of the borrow checker, etc.)), but it was very interesting and informative. Big up to you!
I just can't believe this is FREE content. Thank you so much for sharing your knowledge!
Great intro! Thanks a lot for putting in the effort to create this tutorial. I learned a lot and enjoyed the process!
Thank you Jeremy for your great guides. I am learning so much from you, and your videos are SUPER well made
Omg... The amount of useful information in this video is incredible!
Incredible tutorial. I am coming from the embedded world of C with a tiny bit of Rust experience, so the Rust things are a bit more familiar to me than the web development things. As I am going through this tutorial (and the follow-along), I am starting to really understand the intricacies of the backend. It is so clear that you have put tons of effort into preparation -- when I rewind and watch over, it's not because your explanations are confusing, but because you have managed to distill a lot of knowledge into a little bit of time! Instant subscribe here, this is amazing stuff.
@JeremyChone
9 ай бұрын
Great, thank you for the detailed feedback. I'd appreciate your feedback on the web-app production coding session as well-it's 3 hours and 50 minutes long, so take your time. I'm also working on the second episode of the web-app production coding series, which should be informative too.
it took me like 2 days almost following you line by line, I will have to revisit the code now by myself. This was lots of info in one video considering im totally new in rust let alone its eco-system pakcges etc
Fantastic video Jeremy. I learned so much in this video, thank you 🙏🙏🙏. One small tip: you can use ULIDs instead of UUIDs to get timestamped and sortable IDs, which are certainly useful when using IDs inside logs!
@JeremyChone
Жыл бұрын
Thanks for the kind words! Also, thank you for the note about ULIDs; they can indeed be used. In our case, we prefer timestamps (UTC ISO8601) and UUIDs because their conversions back and forth to numbers are well-known and widely supported. For log analytics, having these two as unsigned numbers can make a significant difference when querying large data sets (e.g., with dataframe tools).
Thank you so much!! I'm just learning Rust, comming from scala, and this kind of resources is hard to find there.
Tu es mon hero. C'est vraiment trop bien tes videos. Merci
Even it's hard for me to keep up with video learning because my english not good enough but I still love his format of tutorial, that's rarely seen on vid turtorial flooding us everyday. Keep up the good work and thank you.
This is a very well done tutorial. Actually useful and well beyond the standard "hello world" nonsense you usually see. This guy does very good videos.
@pb3030
Жыл бұрын
I have a question / thought. By making the context extractor clone the context result you force the crate's Error type to implement Clone. This cascades into an issue with a real world app using 3rd party db's like sqlx. Because we would probably want to use thiserror and #[from] to convert sqlx errors into your crate's custom error type. If you use several external libraries and want to convert several external errors this can be a headache. I handled by implementing From and using a String as the error date.
Thanks for the course! Terse and all important is covered! I even learn some tricks apart from Axum itself!
cant thank you enough for these vids, you have amazing skills!
Thank you for this so much. It is complex but you make it understandable. Superb Rust content 😊😊
Great video, one hour long, will take me 7-8 hours to digest.
Thank God I found you looking forward to learn awesome stuff from you.
Just finished coding along. I learned a lot. Thanks! 👍
Thanks, amazing lesson. Waiting for the next parts
Thank you so much, this is exactly what I was looking for! :D
The right tutorial at the right time. I'm even watching for the second time 👍👍
@JeremyChone
Жыл бұрын
Awesome!!! Thanks for the note.
great tutorial like always ,keep up the good work and thank you.
Jeremy, this is gold! Thank you!
This is a pure Gold!!! Thank you very much J!!!
Thank you, great tutorial as always
Perfect tutorial Jeremy! Happy Coding 🎉
This tutorial is fantastic, you are the best
amazing course Jeremy!!
Wow, the timing! How did you know I needed this right now?
Very good explanations on how to implement Axum and its topology!
Amazing man! Thank you.
You're awesome dude!
Thanks! It was really helpful
Very helpful, thanks a lot for your amazing work 🙏
So glad this video is here. Lets go!
Awesome! Thank you for tutorial
Excellent tutorial! Thank You!
OMG the best video of Axum👍🏻👍🏻
High quality video. Thanks
Regarding the delete implementation in 'CRUD - REST API', I’ve often found it easier to consume from the client if the server returns '204 NoContent', even if the item isn’t found. This makes the call idempotent, which allows the client the ability to retry in case of the prior call failing for any number of reasons. 32:39
before staring video i want to say thanks wish best for you ❤
Thank you so much or this for this brilliant tutorial!
Thanks for this video! I great guides
Great tutorial!
Very good course, greetings from Ecuador
Very Good Video, Thanks a lot for this. :) At about 1 hour, the pace got a bit too fast for me. But it definetely helped me in understand rust and axum etc.
@JeremyChone
7 ай бұрын
Thanks for the kind words. Yes, sometimes the editing might be too fast. I'll make sure to keep it in check for the next ones. Feel free to check out the latest videos about production coding. Here is the playlist: kzread.info/head/PL7r-PXl6ZPcCTTxjmsb9bFZB9i01fAtI7
Thanks for the course! 8:40 It's a good idea 🙂 Like!!!
On the "Path Param" part, you could have shown as well how to use HelloParams with hello2. For me it was very intuitive, even thought your example is also nice (and probably should be kept). Really enjoying this vid!
Great content 🎉
This is amazing, thank you!
Awesome man, great thank u !
Thank you for this so much!
It is very helpful course! Thank you very much for your work!
Yaaay 🎉 tonight I have work !
Excellent!! 🔥🔥🔥 But also very simple and primitive to be honest:) Would be very interesting to see building chat server with Axum and WebSockets
@JeremyChone
8 ай бұрын
Yes, it's intentionally designed to be primitive. You can refer to the follow-up video on web-app production coding; it marks the beginning of an actual app. For more details, visit: rust10x.com/web-app More to come…
omg im so excited. this is my favorite rust channel!
@JeremyChone
Жыл бұрын
A big big one coming Sunday June 11th.
@irlshrek
Жыл бұрын
@@JeremyChone can't wait!!
@JeremyChone
Жыл бұрын
@@irlshrek me too... btw, I need one more week. It's going to be a good one, and want to make sure I give the best. (so, Sunday June 18th)
@irlshrek
Жыл бұрын
@@JeremyChone take your time! ill wait. in the mean time practicing doing everything you show in this video!
@JeremyChone
Жыл бұрын
@@irlshrek Note that the ModelController pattern to scale needs to be split between ModelManager (that hold the db pool)and ModelController (that hold the access per entity, e.g., TaskBmc, for Task Backend Model Controller).
Great video!
Great content😊
Great video. Thanks
I loved the idea of request logging and having a uuid per request. It will make life so much easier when tracing down bug reports if we can get the request uuid from the user! I just implemented your version and did some tweaking so that a uuid is created in the ctx middleware so that it can be used in my tracing layer and set as a tag /attribute on spans for distributed traces! This is a game changer!
@JeremyChone
5 ай бұрын
Awesome!
@JeremyChone
5 ай бұрын
Btw, look at the latest rust web app production blueprint. There are lot of other stuff. You can find the GitHub repository at rust10x.com
@cryoexn7307
5 ай бұрын
I have been slowly watching the series and building along! I’m going to continue watching and learning. But once I push my code I will send a link to my repo so you can check out the open telemetry integrations with the tracing if you are interested! Probably going to be after work tomorrow :)
@JeremyChone
5 ай бұрын
Cool. If you take a look, you'll see a ReqStamp with a mw_req_stamp middleware. This stamps the "request" with the initial time_in and UUID at the appropriate place, and then exposes it as an Axum extractor. This way, all handlers and middleware can access it. The mw_response_mapper utilizes that information for the request UUID and even includes time_in for computing the duration. So, everything fits together nicely.
@JeremyChone
5 ай бұрын
I will probably add open telemetry at some point, but so much to add before that. For us, the RequestLogLine was the higher priority.
Great content, thank you. I am quite impressed at your presentation technique and how your editor and terminal orchestration works well together. Are those special tools you are using or is this just clever video editing? Also, what editor are you using? The multi line editing seems like a neat feature.
@JeremyChone
Жыл бұрын
Thanks for the kind words. I am using VSCode with Google Material theme. ScreenBrush for the line Davinci Resolve for the editing. And a custom Mac screencapture CLI wrapper. Unfortunately, no magic tools, a lot of editing.
@GregFurmanek
Жыл бұрын
@@JeremyChone Nicely done.
@JeremyChone
6 ай бұрын
Btw, I finally took some time to create the Rust10x VSCode Extension and a webpage with information about my VSCode setup. Everything can be found here: rust10x.com/vscode
This is amazing thank you
Great!!!!!!
This is fantastic. Thank you for this. But could you do a video of Axum with surreal db.
@JeremyChone
Жыл бұрын
Good point. This might come later. In the next tutorial, we will refactor the model layer while still using a mock-store (a better one). This will demonstrate how to implement multi-scheme password encryption, secure web tokens, and RPC (JSON-RPC).
thank you 👍🥳
Thank you for a great resource Jeremy! Question: how do you open this "Quick fix" panel for quick imports?
@JeremyChone
6 ай бұрын
I think they comes with VSCode and Rust analyzer. Then, cmd + .
Great!
This is such an awesome "quickstart" guide for newbies into rust like me. Question: how do you handle token claims validation (possibly in the middleware) assuming the token is not stored in a db? To what do we compare the token (or the claims it contains) stored in a cookie at log-in? I suspect I might be missing something though.
@JeremyChone
Жыл бұрын
Next video, June 11, will show full login, pwd encryption, token encryption/validation.
@christopherugbomah8747
Жыл бұрын
@@JeremyChone Thanks for your kind reply the work you do!
Really amazing tutorial : D. Was wondering if you could elaborate on the model controller architecture you used and what it's called? Is it a derivation of MVC?
@JeremyChone
Жыл бұрын
Thank you. Your timing is great, as I am currently constructing the follow-up course, which focuses on best practices for production code. We'll be dividing the ModelManager (which maintains the model-related application states, such as db_pool) and the ModelController, drawing inspiration from the Data Access Object (DAO) pattern. In a project management data model, for instance, you might have: A ProjectBmc (Backend Model Controller) that handles Create, Read, Update, and Delete (CRUD) operations, and possibly more, for Project entities. Similarly, a TaskBmc would manage the CRUD operations, and potentially additional ones, for Task entities. This approach gives you complete control over the data structures and access methods in your Application Domain, while still allowing for code reuse and normalization. Next course is schedule for June 4th.
@maxxue5997
Жыл бұрын
@@JeremyChone Sounds amazing. Can't wait. Thank you :))
Hi jeremy, for next videos you could consider the server sent events implementation with axum, I had problems with the "try_stream!" macro of async_stream when passing custom data to it. Greetings from Colombia, your videos are very good.
@JeremyChone
Жыл бұрын
Ha, that's a good suggestion. Might not be in the next one but at some point. Question: Is your use case for Video or Audio streaming?
@jorgeosorio1613
Жыл бұрын
@@JeremyChone No, actually it was a simpler project. I was using it to display real-time CPU and graphics card information with a browser interface. But you just gave me more ideas for other projects.
@JeremyChone
Жыл бұрын
@@jorgeosorio1613 ha, cool, yes, make sense. By the way, for files in the .mp4 or .mp3/.wav/... formats, I recommend using a cloud CDN such as AWS CloudFront to S3. This approach allows you to sign the URL to ensure security and keep the app server out of the way, which is always preferable. However, when the data is being dynamically processed, you must stream it from the app server.
Great Video! I am wondering how to utiliize snippets like "region" and function definitions that you are so quickly creating? Do you have custom Snippets and hotkeys for VS Code or just utilizing what's in place from rust-analyzer plugin?
@JeremyChone
10 ай бұрын
Just a VSCode Snippet that I bound to 'ctr+c' "comment-section": { "prefix": "cc", "body": [ "// region: --- ${1:Section}", "${2}$TM_SELECTED_TEXT", "// endregion: --- ${1:Section}" ], "description": "Comment Section" },
@JeremyChone
6 ай бұрын
Btw, I finally took some time to create the Rust10x VSCode Extension and a webpage with information about my VSCode setup. Everything can be found here: rust10x.com/vscode
Hi, thanks for the great video. One question tho, how come the Ctx extractor gets called twice between mw_ctx_resolver and mw_require_auth after we implement the server log line? I know one of the calls is to extract the Ctx for mw_require_auth, but what about the other one?
@JeremyChone
5 ай бұрын
The mw_ctx_resolver resolves the CTX (essentially performing the authentication) and then stores it in req.extensions, so it doesn't need to be computed again. The mw_ctx_require is an optional middleware that ensures anything following it has a CTX, even if they don't explicitly require it. This is currently just an optional safeguard because downstream handlers that request CTX will fail if there isn't one. However, it's good to have.
subscribed! Appreciate the lesson. Is it possible to have a tutorial on deploying Rust apps to a web server? That would make the lesson "complete" 😊
@JeremyChone
Жыл бұрын
Thanks! The next video will be about leveling up and building the Rust Axum base code for a real application, featuring password encryption (multi-scheme), secure tokens, PostgreSQL/SQLx, and a scalable Model layer. So, not the deployment to cloud, which will come later with Kubernetes when we will learn how to do multi-service cloud app.
@BOOGLE020
Жыл бұрын
@@JeremyChone thank you! Looking forward for it. I'm a newbie in Rust and somehow deploying to a cloud is a sort of "hello world" for me just to get the feel on how I can use it in a production environment.
Thank you very much for the video! How do you do quick #region?
@JeremyChone
10 ай бұрын
Code snippet "comment-section": { "prefix": "cc", "body": [ "// region: --- ${1:Section}", "${2}$TM_SELECTED_TEXT", "// endregion: --- ${1:Section}" ], "description": "Comment Section" },
Nice, it would have been nice to have a branch with the starting state so we follow along
@JeremyChone
Жыл бұрын
Yes, I could do that. Will think about it for next full course.
All my rust webdev thus far has been messing around with rocket - this does feel significantly lower level (rocket feels closer to a rails experience), but this does look interesting.
@JeremyChone what extension are you using to quickly add those region comments in your videos? BTW, I really love the way you go deep into explaining Rust concepts and design patterns you use. Please keep it up. The community needs more of these type of tutorials to get more engineers to learn and use Rust. Thanks you so much!
@benbolivar7954
10 ай бұрын
Thanks @JeremyChone for the like. I'm going through your videos just now when I saw your feedback came in. Again, what extension are you using for those quick snippets? I really like your style of partitioning your code into regions but can't seem to find the right vscode extension to do it as quickly as you are doing in the videos.
@JeremyChone
10 ай бұрын
Thank you for the note. I just a VSCode code snippet.
@benbolivar7954
10 ай бұрын
@@JeremyChone thanks again. That's what I thought
@benbolivar7954
10 ай бұрын
Thanks again @@JeremyChone . Added below in rust.json (ctrl-shift-p) and now I can create regions just like you do in your videos: "Region comment": { "prefix": "reg", "body": [ "// region: ---> ${1:reg}", "// endregion: ---> ${1:reg}", ] }
@JeremyChone
10 ай бұрын
@@benbolivar7954 "comment-section": { "prefix": "cc", "body": [ "// region: --- ${1:Section}", "${2}$TM_SELECTED_TEXT", "// endregion: --- ${1:Section}" ], "description": "Comment Section" }, Here is what I have. I aligned the "--- section_name} with white space. And then, in my keybindings.json I have { "key": "ctrl+c", "command": "editor.action.insertSnippet", "when": "editorTextFocus", "args": { "name": "comment-section" } },
Great video. I wonder, what app do you use to draw on screen with your mouse cursor?
@JeremyChone
Жыл бұрын
ScreenBrush on Mac (in the app store I think)
@_erayerdin
Жыл бұрын
@@JeremyChone thank you
Whenever you use code assist to import a symbol (add use statement), you should say "Attention! Importing!" out loud. The code assist UI disappears after a split second and one must rewind to see which symbol was imported (if there are multiple suggestions).
@JeremyChone
Жыл бұрын
Typically, I take a moment to comment when a decision is needed (though I may have missed a few). For more trivial matters, such as import decisions, I try not to interrupt the flow too much, as these should be straightforward to handle.
Wonderful tutorial! Something im noticing is that the returning status code is not the same as error IntoResponse status code. For a failed login it should return 403 but it's returning 500, did I miss something?
@JeremyChone
Жыл бұрын
Thanks for the kind words. It does send back a 403 Forbidden if the wrong login. (with the full final code). Here is how it works: - The impl IntoResponse for Error creates a placeholder for the real error. - The main_response_mapper will get the error and call the client_status_and_error, which will return the appropriate status code and send that back to the client. If you go to the quick_dev, and change the password on the login, you will see the login and tickets response with the following status: Status : 403 Forbidden Hope this helps. I just tested the code, and works as expected. Let me know if you have any further question.
@NetherFX
Жыл бұрын
@@JeremyChone Just pulled the repo and I didnt notice the "error_response.unwrap_or(res)" at the end 😅That makes a lot more sense, thank you!
Hello Jeremy, Excellent training. thank you! Can diesel be integrated to Axum an Tokio for a backend API? Can actix-web be integrated to Axum? or not necessary? What is your opinion of actix-web vs Axum? or they are for different purposes! What would be the best set of Rust tools / frameworks for a backend project? Thank you!
@JeremyChone
Жыл бұрын
1. Diesel - Definitely, you can use any db connectivity. Personally, I like lower db lib, like SQLx, but anything will go. 2. Actix-Web v.s. Axum - They solve the same problem, so, it would not make sense to use both. 3. Actix-Web v.s. Axum - I prefer Axum, as it is a newer tech, has a very clean API and app model, and is very well maintained. Actix-Web API looks similar, but I have not played too much with it, as I am very happy with Axum. 4. I have a new video showing pwd/token encryption, database connectivity (with SQLx), and clean architecture.
Hello, I'm stuck between axum and actix-web. As a result of the research, axum seems to be better, but in the benchmark tests I researched, actix had a slightly better performance. I'm confused, which one would you recommend? On the one hand, there is the C++ Drogon Api. In the benchmark tests written simultaneously, I saw that java-undertown processes more requests than go-rust(Actix-web), C++(Drogon), frankly, I was surprised and did not expect it at all. As a result, I prefer Rust. I'm stuck between axum & actix-web. Could you share your experiences? Thank you.
@JeremyChone
Жыл бұрын
Personally, I decided to got with Axum. I think the benchmark difference are negligible at this scale, and Axum seems more modern and is very well maintained. However, I do not have a deep experience in Axum. Here is some more background input on Reddit www.reddit.com/r/rust/comments/12n1vdc/comment/jgk4ows/?context=3
@Jeremy Chone Why do you not provide a means to set headers in your testing client?
@JeremyChone
11 ай бұрын
That's a good question. Originally, I didn't aim to delve too deeply into rebuilding Reqwest on top of Reqwest. Instead, I focused more on "browser" use cases, where authentication is typically done with cookies. However, now I agree that it would be beneficial to broaden the scope and allow the setting of headers. The route I'm keen to avoid is the full reconstruction of a Reqwest API using the Reqwest library. My proposed approach is to expose an API like http_client.exec(reqwest_builder), perhaps coupled with some utilities for building these builders. This approach allows developers to use the simple httpc-test API/Prints, while simultaneously harnessing the full power of the Reqwest request builder. Does that make sense?
@martinbecker1069
11 ай бұрын
@@JeremyChone Indeed
Thank you for this great tutorial. In this vedio, I wonder your vscode plugin setting, especially multi region annotation part..
@JeremyChone
9 ай бұрын
I put some of my VSCode settings at: rust10x.com/vscode There is the comment-section there, and the key binding for it.
@JeremyChone
6 ай бұрын
BTW, I finally took some time to create the Rust10x VSCode Extension and a webpage with information about my VSCode setup. Everything can be found here: rust10x.com/vscode
@ise1153
6 ай бұрын
@@JeremyChone thx bro:)