Skip to content

An implementation of RFC9457, Problem Details for HTTP APIs

License

Notifications You must be signed in to change notification settings

KeyWeeUsr/problemdetail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
)