From 0ca431d3b33d7383297464fce04c35c2c24a3d6a Mon Sep 17 00:00:00 2001 From: Nazarii-4chain Date: Thu, 1 Feb 2024 13:09:46 +0200 Subject: [PATCH 1/2] Updated methods --- transports/http.go | 2 +- transports/http_admin.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/transports/http.go b/transports/http.go index 9a8778b..c0fdb8e 100644 --- a/transports/http.go +++ b/transports/http.go @@ -359,7 +359,7 @@ func (h *TransportHTTP) UpdateDestinationMetadataByLockingScript(ctx context.Con func (h *TransportHTTP) GetTransaction(ctx context.Context, txID string) (*buxmodels.Transaction, ResponseError) { var transaction buxmodels.Transaction if err := h.doHTTPRequest( - ctx, http.MethodGet, "/transaction?"+FieldID+"="+txID, nil, h.xPriv, h.signRequest, &transaction, + ctx, http.MethodPost, "/transaction?"+FieldID+"="+txID, nil, h.xPriv, h.signRequest, &transaction, ); err != nil { return nil, err } diff --git a/transports/http_admin.go b/transports/http_admin.go index f0fb3a9..d15ebbb 100644 --- a/transports/http_admin.go +++ b/transports/http_admin.go @@ -265,7 +265,7 @@ func (h *TransportHTTP) adminGetModels(ctx context.Context, conditions map[strin } if err := h.doHTTPRequest( - ctx, http.MethodGet, path, jsonStr, h.xPriv, true, &models, + ctx, http.MethodPost, path, jsonStr, h.xPriv, true, &models, ); err != nil { return err } From 9188fe021b273535fe78f13433e52c3b9cc4147c Mon Sep 17 00:00:00 2001 From: Nazarii-4chain Date: Thu, 1 Feb 2024 13:14:13 +0200 Subject: [PATCH 2/2] Updated methods --- transports/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transports/http.go b/transports/http.go index c0fdb8e..9a8778b 100644 --- a/transports/http.go +++ b/transports/http.go @@ -359,7 +359,7 @@ func (h *TransportHTTP) UpdateDestinationMetadataByLockingScript(ctx context.Con func (h *TransportHTTP) GetTransaction(ctx context.Context, txID string) (*buxmodels.Transaction, ResponseError) { var transaction buxmodels.Transaction if err := h.doHTTPRequest( - ctx, http.MethodPost, "/transaction?"+FieldID+"="+txID, nil, h.xPriv, h.signRequest, &transaction, + ctx, http.MethodGet, "/transaction?"+FieldID+"="+txID, nil, h.xPriv, h.signRequest, &transaction, ); err != nil { return nil, err }