When working with Actix-Web, we sometimes need to access incoming HTTP requests to inspect for some values. In that case, we need to use the HttpRequest struct either in request handlers and middlewares. Cargo.toml We will use the following dependencies
Actix-Web Basic And Bearer Authentication Examples
This post has code examples for Actix-Web Basic and Bearer authentications in Rust. In a Basic authentication scheme, a client transmits credentials as user Id and password pairs in base64 format. Meanwhile, a client sends a string token in a
Show Rust Dependencies Using Cargo
It is now possible to show Rust dependencies using Cargo. Before Rust 1.44.0, there was not a built-in method to display a dependency graph. There was a plugin, though, called cargo-tree. Show Rust Dependencies Using Cargo-tree With the cargo-tree plugin,
Swap Between Vec Elements in Rust
Swapping between Vec elements in Rust can be a little tricky. The get method returns Option<&T>, and the lone swap method accepts an index and a value – not a reference. There is an alternative, though. But it uses unsafe codes.
Lenovo T495 R12HT51W BIOS Update
Lenovo T495 R12HT51W BIOS update may cause Windows 10 to not load during system start-up. It may not be related to Windows updates KB4552931 and KB45565799 because I have those updates in my system before upgrading to that version of
Rust Framework Rocket Goes Stable With No Exact Date
Rust framework Rocket goes stable, starting with version 0.5 and Rust 1.45.0. No doubt, it is one of the best frameworks out there. However, it requires Rust Nightly. When I started learning Rust, I needed to choose between Actix-Web and
WordPress Plugin And Composer
This post quickly shows the basic usage of WordPress Plugin and Composer. We are to use a PHP library within our own already existing WordPress Plugin. Composer We can use Composer with a WordPress plugin. The composer is a dependency
Define And Use Functions In Julia
This post is about how to define and use functions in Julia. A function is a block of codes that performs a specific operation. It may accept parameters which may influence its behavior. It may also return values to codes
Plot XY Graph in Julia Using Data Points
Plotting numbers in the XY graph in Julia can help us create the big picture. This post shows how to plot data points in a graph using the Plots and GR packages. These data points are our x-y coordinates. Install
How To Create Array Literals In Julia
This post is about how to create array literals in Julia. When we write out array values, we create array literals. Julia can readily interpret these array literals. There are other ways to create arrays in Julia, but we will