Skip to content

Commit 143f29f

Browse files
committed
Remove unused code for response handling
1 parent c7cacf7 commit 143f29f

File tree

1 file changed

+1
-41
lines changed

1 file changed

+1
-41
lines changed

apiintegrations/jamfpro/README.MD

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ The Jamf Pro API Handler is an integral component of the Go API HTTP Client, des
99
- **Accept Header Management**: Generates a weighted `Accept` header to indicate the client's capability to process various MIME types, prioritizing XML for compatibility with the Classic API.
1010
- **Standard Headers**: Provides a set of standard headers required for API requests, including `Accept`, `Content-Type`, and `Authorization`.
1111
- **Request Marshaling**: Encodes request bodies into the appropriate format (XML or JSON) based on the target API endpoint, with support for multipart/form-data encoding for file uploads.
12-
- **Response Handling**: Processes API responses, decoding them into the desired data structures and handling binary data responses where applicable.
1312

1413
The logic of this api handler is defined as follows:
1514
Classic API:
@@ -36,43 +35,4 @@ For responses (DELETE):
3635
- Handle response codes as response body lacks anything useful.
3736
Headers
3837
- Sets accept headers based on weighting. Jamf Pro API doesn't support XML, so MIME type is skipped and returns JSON
39-
- Set content header as application/json with edge case exceptions based on need.
40-
41-
42-
## Usage
43-
44-
To utilize the Jamf Pro API Handler within the Go API HTTP Client, instantiate the client with the Jamf Pro-specific configuration:
45-
46-
```go
47-
package main
48-
49-
import (
50-
"log"
51-
52-
"github.com/deploymenttheory/go-api-http-client/httpclient"
53-
"github.com/deploymenttheory/go-api-http-client/apihandlers/jamfpro"
54-
)
55-
56-
func main() {
57-
// Configuration for the HTTP client specific to Jamf Pro
58-
config := httpclient.ClientConfig{
59-
Environment: httpclient.EnvironmentConfig{
60-
InstanceName: "your-instance-name",
61-
APIType: "jamfpro", // Specify the API type as "jamfpro"
62-
},
63-
// Other configuration settings...
64-
}
65-
66-
// Initialize the Jamf Pro API handler with the configuration
67-
jamfHandler, err := jamfpro.LoadAPIHandler(config.Environment.APIType, config.Logger)
68-
if err != nil {
69-
log.Fatalf("Failed to initialize Jamf Pro API handler: %v", err)
70-
}
71-
72-
// Use the handler for API interactions
73-
// Example: Constructing an API resource endpoint
74-
resourceURL := jamfHandler.ConstructAPIResourceEndpoint(config.Environment.InstanceName, "/path/to/resource", config.Logger)
75-
log.Printf("Constructed Resource URL: %s", resourceURL)
76-
77-
// Proceed with making API calls using the constructed URLs and the configured HTTP client...
78-
}
38+
- Set content header as application/json with edge case exceptions based on need.

0 commit comments

Comments
 (0)