liveBook · Manning

Request target

As explained in API Design Patterns

A request target is the canonicalized request-line component that identifies an HTTP action and its target path.

A request target combines an HTTP method with the target path, such as `patch /chatRooms/1`. Canonicalizing this pair gives request authentication a stable representation of the requested action and resource. section 30.3.4

Use the request target as one ordered component of a request fingerprint, alongside the host, date, and a digest of the body. Lowercase the method and header names, then separate canonical fields with newlines before signing. section 30.3.4

Signed chat-room update

A PATCH request to `/chatRooms/1` can contribute `(request-target): patch /chatRooms/1` to a fingerprint. The same fingerprint can include `host: example.org`, a creation date, and a Base64 SHA-256 body digest.

How API Design Patterns covers it

How deep it goes
Explains composition, canonical formatting, ordering, and implementation, but defers communicating fingerprint parameters to the server.
Examples
Uses a PATCH request for `/chatRooms/1` and a canonical fingerprint containing host, date, and a SHA-256 digest.
What you can do after
Build a canonical request fingerprint suitable as the payload for computing a digital signature.
How it connects
Connects HTTP methods, URL paths, request bodies, HTTP headers, digests, and digital signatures.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of API Design Patterns. The section links point to the parts of the book it draws on.