Skip to content

Commit

Permalink
Update Request.sol (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xScratch authored Sep 4, 2023
1 parent 4fcd985 commit 577a0b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/_modules/experimental/Request.sol
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ library LibRequestBuilder {
Request memory req = self.request.toValue();
uint256 len = req.headers.length;
req.headers = new Header[](len + 1);
for (uint256 i = 0; i < len; i++) {
for (uint256 i; i < len; i++) {
req.headers[i] = req.headers[i];
}
req.headers[len] = Header({key: key, value: value});
Expand All @@ -242,7 +242,7 @@ library LibRequest {
string memory script =
string.concat('response=$(curl -s -w "\\n%{http_code}" ', self.url, " -X ", toString(self.method));

for (uint256 i = 0; i < self.headers.length; i++) {
for (uint256 i; i < self.headers.length; i++) {
script = string.concat(script, " -H ", '"', self.headers[i].key, ": ", self.headers[i].value, '"');
}

Expand Down

0 comments on commit 577a0b7

Please sign in to comment.