It will depend what you are using for your api calls. cURL for example has --digest flag, python requests has requests.auth.HTTPDigestAuth() class. Its not generally something you’ll have to do for yourself.
Currently, I am executing this call in postman, I have selected Digest Auth type in the Authorization tab and added username and password, When I execute its response:
<h1>Bad Message 400</h1>
<pre>reason: Ambiguous URI empty segment</pre>
My end goal is to implement it in nodejs/expressjs (got NPM)!