File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ const (
35
35
func (j * Integration ) getContentTypeHeader (endpoint string ) string {
36
36
j .Sugar .Debug ("Determining Content-Type for endpoint" , zap .String ("endpoint" , endpoint ))
37
37
38
+ // Set this header for PATCH requests on patch software title configurations
39
+ if strings .Contains (endpoint , "/api/v2/patch-software-title-configurations/" ) {
40
+ j .Sugar .Debugw ("Content-Type for PATCH endpoint set to application/merge-patch+json" , "endpoint" , endpoint )
41
+ return "application/merge-patch+json"
42
+ }
43
+
38
44
// TODO change this contains to regex. We want to rule out malformed endpoints with multiple occurances.
39
45
if strings .Contains (endpoint , "/api/v1/packages/" ) && strings .Contains (endpoint , "/upload" ) {
40
46
j .Sugar .Debugw ("Content-Type for packages upload endpoint set to application/octet-stream" , "endpoint" , endpoint )
@@ -47,7 +53,6 @@ func (j *Integration) getContentTypeHeader(endpoint string) string {
47
53
48
54
if strings .Contains (endpoint , "/JSSResource" ) {
49
55
j .Sugar .Debugw ("Content-Type for endpoint defaulting to XML for Classic API" , "endpoint" , endpoint )
50
- // TODO should this be application/xml or text/xml?
51
56
return "application/xml"
52
57
}
53
58
You can’t perform that action at this time.
0 commit comments