(ctx context.Context, path string, data map[string]interface{})
| 329 | } |
| 330 | |
| 331 | func (c *Logical) JSONMergePatch(ctx context.Context, path string, data map[string]interface{}) (*Secret, error) { |
| 332 | r := c.c.NewRequest(http.MethodPatch, "/v1/"+path) |
| 333 | r.Headers.Set("Content-Type", "application/merge-patch+json") |
| 334 | if err := r.SetJSONBody(data); err != nil { |
| 335 | return nil, err |
| 336 | } |
| 337 | |
| 338 | return c.write(ctx, path, r) |
| 339 | } |
| 340 | |
| 341 | func (c *Logical) WriteBytes(path string, data []byte) (*Secret, error) { |
| 342 | return c.WriteBytesWithContext(context.Background(), path, data) |