Skip to content

Commit 532fa71

Browse files
author
pavel-z1
committed
Backward compatibility of phpipam API format for phpipam 1.6.0 and higher
1 parent dfc3998 commit 532fa71

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

phpipam/request/request.go

+2
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,10 @@ func (r *Request) Send() error {
155155
buf := bytes.NewBuffer(bs)
156156
req, err = http.NewRequest(r.Method, fmt.Sprintf("%s/%s%s", r.Session.Config.Endpoint, r.Session.Config.AppID, r.URI), buf)
157157
req.Header.Add("Content-Type", "application/json")
158+
req.Header.Add("api-stringify-results", "1")
158159
case "GET":
159160
req, err = http.NewRequest(r.Method, fmt.Sprintf("%s/%s%s", r.Session.Config.Endpoint, r.Session.Config.AppID, r.URI), nil)
161+
req.Header.Add("api-stringify-results", "1")
160162

161163
default:
162164
return fmt.Errorf("API request method %s not supported by PHPIPAM", r.Method)

0 commit comments

Comments
 (0)