Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit cc2fbcd

Browse files
gshatz73pavius
authored andcommitted
IG-11494: Use PUT instead of POST for idempotent operations. (#17) (#18)
1 parent 53e2b48 commit cc2fbcd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

synccontainer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ func (sc *SyncContainer) SeekShard(input *SeekShardInput) (*Response, error) {
460460

461461
buffer.WriteString(`}`)
462462

463-
response, err := sc.session.sendRequest("POST", sc.getPathURI(input.Path), seekShardsHeaders, buffer.Bytes(), false)
463+
response, err := sc.session.sendRequest("PUT", sc.getPathURI(input.Path), seekShardsHeaders, buffer.Bytes(), false)
464464
if err != nil {
465465
return nil, err
466466
}
@@ -484,7 +484,7 @@ func (sc *SyncContainer) GetRecords(input *GetRecordsInput) (*Response, error) {
484484
input.Location,
485485
input.Limit)
486486

487-
response, err := sc.session.sendRequest("POST", sc.getPathURI(input.Path), getRecordsHeaders, []byte(body), false)
487+
response, err := sc.session.sendRequest("PUT", sc.getPathURI(input.Path), getRecordsHeaders, []byte(body), false)
488488
if err != nil {
489489
return nil, err
490490
}

0 commit comments

Comments
 (0)