File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,17 @@ import (
1515// If the endpoint does not match any of the predefined patterns, "application/json" is used as a fallback.
1616// This method logs the decision process at various stages for debugging purposes.
1717func (j * Integration ) getContentTypeHeader (endpoint string ) string {
18+ if strings .Contains (endpoint , "/api/v1/packages" ) {
19+ j .Logger .Debug ("Content-Type for packages endpoint set to application/octet-stream" , zap .String ("endpoint" , endpoint ))
20+ return "application/octet-stream"
21+ }
22+
1823 if strings .Contains (endpoint , "/JSSResource" ) {
1924 j .Logger .Debug ("Content-Type for endpoint defaulting to XML for Classic API" , zap .String ("endpoint" , endpoint ))
2025 return "application/xml"
21- } else if strings .Contains (endpoint , "/api" ) {
26+ }
27+
28+ if strings .Contains (endpoint , "/api" ) {
2229 j .Logger .Debug ("Content-Type for endpoint defaulting to JSON for JamfPro API" , zap .String ("endpoint" , endpoint ))
2330 return "application/json"
2431 }
You can’t perform that action at this time.
0 commit comments