File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1- 2.10 .0
1+ 2.11 .0
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ type FormalSDK struct {
3737func New (apiKey string ) * FormalSDK {
3838 httpClient := & http.Client {Transport : & transport {
3939 apiKey : apiKey ,
40+ apiVersion : "2025-02-24" ,
4041 underlyingTransport : http .DefaultTransport ,
4142 }}
4243 return & FormalSDK {
@@ -67,6 +68,7 @@ func New(apiKey string) *FormalSDK {
6768func NewWithUrl (apiKey string , url string ) * FormalSDK {
6869 httpClient := & http.Client {Transport : & transport {
6970 apiKey : apiKey ,
71+ apiVersion : "2025-02-24" ,
7072 underlyingTransport : http .DefaultTransport ,
7173 }}
7274 return & FormalSDK {
@@ -96,10 +98,12 @@ func NewWithUrl(apiKey string, url string) *FormalSDK {
9698
9799type transport struct {
98100 underlyingTransport http.RoundTripper
101+ apiVersion string
99102 apiKey string
100103}
101104
102105func (t * transport ) RoundTrip (req * http.Request ) (* http.Response , error ) {
103106 req .Header .Add ("X-Api-Key" , t .apiKey )
107+ req .Header .Add ("X-Formal-API-Version" , t .apiVersion )
104108 return t .underlyingTransport .RoundTrip (req )
105109}
You can’t perform that action at this time.
0 commit comments