(operatorConfig OperatorConfig, endpoint string, jsonRequestData []byte, qParams ...map[string]string)
| 62 | } |
| 63 | |
| 64 | func HTTPPostJSON(operatorConfig OperatorConfig, endpoint string, jsonRequestData []byte, qParams ...map[string]string) ([]byte, error) { |
| 65 | payload := bytes.NewBuffer(jsonRequestData) |
| 66 | req, err := operatorRequest(operatorConfig, http.MethodPost, endpoint, payload, qParams...) |
| 67 | if err != nil { |
| 68 | return nil, err |
| 69 | } |
| 70 | req.Header.Set("Content-Type", "application/json") |
| 71 | return makeOperatorRequest(operatorConfig, req) |
| 72 | } |
| 73 | |
| 74 | func HTTPPostNoBody(operatorConfig OperatorConfig, endpoint string, qParams ...map[string]string) ([]byte, error) { |
| 75 | req, err := operatorRequest(operatorConfig, http.MethodPost, endpoint, nil, qParams...) |
no test coverage detected