From e70ec19f80aa188a88111326094a8d37ebbd31ab Mon Sep 17 00:00:00 2001 From: Joseph Little Date: Wed, 31 Jul 2024 09:59:32 +0100 Subject: [PATCH 1/5] to latest http client --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 12fc245..fc2db9a 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/deploymenttheory/go-api-http-client-integrations go 1.22.4 require ( - github.com/deploymenttheory/go-api-http-client v0.2.9-0.20240729085958-f2cfa229bce4 + github.com/deploymenttheory/go-api-http-client v0.2.9 go.uber.org/zap v1.27.0 ) diff --git a/go.sum b/go.sum index 0a656ef..39a9ce7 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/antchfx/xpath v1.3.1 h1:PNbFuUqHwWl0xRjvUPjJ95Agbmdj2uzzIwmQKgu4oCk= github.com/antchfx/xpath v1.3.1/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deploymenttheory/go-api-http-client v0.2.9-0.20240729085958-f2cfa229bce4 h1:AXTxfKhE2R07C8TDH5vVbf1FwBe61wPoWJ1Y92+SdVA= -github.com/deploymenttheory/go-api-http-client v0.2.9-0.20240729085958-f2cfa229bce4/go.mod h1:LKDnBcieS6CyikZjTKPpziVdxnTwzBHE6Hx1cuWRcuU= +github.com/deploymenttheory/go-api-http-client v0.2.9 h1:6q4ZeyeR96y79mWwpxeO2l8vSQJQ9Ci/nbZ071o59LU= +github.com/deploymenttheory/go-api-http-client v0.2.9/go.mod h1:LKDnBcieS6CyikZjTKPpziVdxnTwzBHE6Hx1cuWRcuU= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= From 6c0eefce0e6f282a48a67b786aeccb053f2f730e Mon Sep 17 00:00:00 2001 From: Joseph Little Date: Mon, 12 Aug 2024 16:16:59 +0100 Subject: [PATCH 2/5] gitignore & header logic tweak --- .gitignore | 1 + jamf/jamfprointegration/headers.go | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a48538 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_store \ No newline at end of file diff --git a/jamf/jamfprointegration/headers.go b/jamf/jamfprointegration/headers.go index 30b844f..e2a8f34 100644 --- a/jamf/jamfprointegration/headers.go +++ b/jamf/jamfprointegration/headers.go @@ -41,6 +41,10 @@ func (j *Integration) getContentTypeHeader(endpoint string) string { return "application/octet-stream" } + if strings.Contains(endpoint, "icon") { + return "multipart/form-data" + } + if strings.Contains(endpoint, "/JSSResource") { j.Sugar.Debugw("Content-Type for endpoint defaulting to XML for Classic API", "endpoint", endpoint) // TODO should this be application/xml or text/xml? From 2049375c90330ffb32541db5f3f36e670bdc87a4 Mon Sep 17 00:00:00 2001 From: Joseph Little Date: Tue, 13 Aug 2024 10:21:27 +0100 Subject: [PATCH 3/5] to testing branches --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fc2db9a..aeb6112 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/deploymenttheory/go-api-http-client-integrations go 1.22.4 require ( - github.com/deploymenttheory/go-api-http-client v0.2.9 + github.com/deploymenttheory/go-api-http-client v0.2.10 go.uber.org/zap v1.27.0 ) diff --git a/go.sum b/go.sum index 39a9ce7..da24e61 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/antchfx/xpath v1.3.1 h1:PNbFuUqHwWl0xRjvUPjJ95Agbmdj2uzzIwmQKgu4oCk= github.com/antchfx/xpath v1.3.1/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deploymenttheory/go-api-http-client v0.2.9 h1:6q4ZeyeR96y79mWwpxeO2l8vSQJQ9Ci/nbZ071o59LU= -github.com/deploymenttheory/go-api-http-client v0.2.9/go.mod h1:LKDnBcieS6CyikZjTKPpziVdxnTwzBHE6Hx1cuWRcuU= +github.com/deploymenttheory/go-api-http-client v0.2.10 h1:rV9IEqt3R6LDm+OVNoMLeuouuw615licr3ULaHEFa2s= +github.com/deploymenttheory/go-api-http-client v0.2.10/go.mod h1:LKDnBcieS6CyikZjTKPpziVdxnTwzBHE6Hx1cuWRcuU= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= From 60356b3bf69ab84c2d23af9ac280ae49f210aec6 Mon Sep 17 00:00:00 2001 From: Joseph Little Date: Tue, 13 Aug 2024 10:36:12 +0100 Subject: [PATCH 4/5] to testing branches --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index aeb6112..5cd7b4c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/deploymenttheory/go-api-http-client-integrations go 1.22.4 require ( - github.com/deploymenttheory/go-api-http-client v0.2.10 + github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240801155241-3504d44ae1ef go.uber.org/zap v1.27.0 ) diff --git a/go.sum b/go.sum index da24e61..43d248f 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/antchfx/xpath v1.3.1 h1:PNbFuUqHwWl0xRjvUPjJ95Agbmdj2uzzIwmQKgu4oCk= github.com/antchfx/xpath v1.3.1/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deploymenttheory/go-api-http-client v0.2.10 h1:rV9IEqt3R6LDm+OVNoMLeuouuw615licr3ULaHEFa2s= -github.com/deploymenttheory/go-api-http-client v0.2.10/go.mod h1:LKDnBcieS6CyikZjTKPpziVdxnTwzBHE6Hx1cuWRcuU= +github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240801155241-3504d44ae1ef h1:SsCLj+eyB299Fc/w74IELj34Iav+QzXcww5Lhg/iqaE= +github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240801155241-3504d44ae1ef/go.mod h1:LKDnBcieS6CyikZjTKPpziVdxnTwzBHE6Hx1cuWRcuU= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= From 300abc4560853560971fa74d220fb2e7e3eb637c Mon Sep 17 00:00:00 2001 From: Joseph Little Date: Tue, 13 Aug 2024 14:55:56 +0100 Subject: [PATCH 5/5] to latest http client --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5cd7b4c..295a53c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/deploymenttheory/go-api-http-client-integrations go 1.22.4 require ( - github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240801155241-3504d44ae1ef + github.com/deploymenttheory/go-api-http-client v0.2.11 go.uber.org/zap v1.27.0 ) diff --git a/go.sum b/go.sum index 43d248f..17ab9e0 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,8 @@ github.com/antchfx/xpath v1.3.1 h1:PNbFuUqHwWl0xRjvUPjJ95Agbmdj2uzzIwmQKgu4oCk= github.com/antchfx/xpath v1.3.1/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240801155241-3504d44ae1ef h1:SsCLj+eyB299Fc/w74IELj34Iav+QzXcww5Lhg/iqaE= -github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240801155241-3504d44ae1ef/go.mod h1:LKDnBcieS6CyikZjTKPpziVdxnTwzBHE6Hx1cuWRcuU= +github.com/deploymenttheory/go-api-http-client v0.2.11 h1:hEVxXX60cUxRqKkJBHADC/S91+iCPYdBIwkT6stexTY= +github.com/deploymenttheory/go-api-http-client v0.2.11/go.mod h1:LKDnBcieS6CyikZjTKPpziVdxnTwzBHE6Hx1cuWRcuU= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=