Skip to content

Commit

Permalink
refactor: use shared constant for 'Content-Type' header
Browse files Browse the repository at this point in the history
  • Loading branch information
lrosenfeldt committed Aug 8, 2024
1 parent 386de7c commit 8f4ee48
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public OrderResponse createOrder(String merchantId, String commerceCaseId,
Request request = new Request.Builder()
.url(url)
.post(formBody)
.header("Content-Type", formBody.contentType().toString())
.header(CONTENT_TYPE_HEADER_NAME, formBody.contentType().toString())
.build();

return this.makeApiCall(request, OrderResponse.class);
Expand Down Expand Up @@ -106,7 +106,7 @@ public DeliverResponse deliverOrder(String merchantId, String commerceCaseId,
Request request = new Request.Builder()
.url(url)
.post(formBody)
.header("Content-Type", formBody.contentType().toString())
.header(CONTENT_TYPE_HEADER_NAME, formBody.contentType().toString())
.build();

return this.makeApiCall(request, DeliverResponse.class);
Expand Down Expand Up @@ -148,7 +148,7 @@ public ReturnResponse returnOrder(String merchantId, String commerceCaseId,
Request request = new Request.Builder()
.url(url)
.post(formBody)
.header("Content-Type", formBody.contentType().toString())
.header(CONTENT_TYPE_HEADER_NAME, formBody.contentType().toString())
.build();

return this.makeApiCall(request, ReturnResponse.class);
Expand Down

0 comments on commit 8f4ee48

Please sign in to comment.