Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.19 KB

README.md

File metadata and controls

40 lines (31 loc) · 1.19 KB

Buy me a coffee Liberapay PayPal

problemdetail

This is a simple implementation of Problem Details for HTTP APIs RFC providing a simple struct Problem with resolvable members and serialization to JSON.

Please check examples folder for a sample or simply run make run-examples.

How to

VPM package upload is planned but currently blocked by vlang/vpm#126. In the meantime you can use:

v install --git https://github.com/keyweeusr/problemdetail

or clone and either make local-install or build manually within your project. Then simply:

import problemdetail
problemdetail.new(
    type ?URL,
    status int,
    title string,
    detail string,
    instance ?URL
)