Skip to content

Commit

Permalink
We make the final modification to get the test to pass!
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoudimus committed May 6, 2024
1 parent 78b32cb commit 7ddfac1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions larky/src/main/resources/vgs/http/request.star
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ load("@stdlib//larky", larky="larky")
load("@stdlib//urllib/parse", parse="parse")
load("@stdlib//urllib/request", urllib_request="request")

load("@vendor//multidict", CIMultiDict="CIMultiDict")

def VGSHttpRequest(
url,
data=None,
Expand Down Expand Up @@ -52,8 +54,11 @@ def VGSHttpRequest(
headers={},
method=None
):
# call super init, with overrides
self.__init__(url, data=data, headers=headers, method=method)
# We want the "base class" to initialize headers, then after
# it takes care of all the initialization, we then, overwrite
# the headers property to make it into a Case Insensitive "MultiDict"
self.__init__(url, data=data, headers={}, method=method)
self.headers = CIMultiDict(headers)
self.url = url
parsed_url = parse.urlsplit(url)
self.path = parsed_url.path
Expand Down

0 comments on commit 7ddfac1

Please sign in to comment.