Skip to content

Commit 9af1616

Browse files
authored
Merge pull request #9 from codecat15/multipart-form-data-format
updating read me
2 parents 444b967 + b2cf044 commit 9af1616

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Given are the some of the examples on how you can make use of this utility
4141
```swift
4242
let utility = HTTPUtility.shared // using the shared instance of the utility to make the API call
4343
let requestUrl = URL(string: "http://demo0333988.mockable.io/Employees")
44-
let request = HURequest(url: requestUrl!, method: .get)
44+
let request = HURequest(withUrl: requestUrl!, forHttpMethod: .get)
4545

4646
utility.request(huRequest: request, resultType: Employees.self) { (response) in
4747
switch response
@@ -67,7 +67,7 @@ let requestUrl = URL(string: "https://api-dev-scus-demo.azurewebsites.net/api/Us
6767
let registerUserRequest = RegisterUserRequest(firstName: "code", lastName: "cat15", email: "[email protected]", password: "1234")
6868

6969
let registerUserBody = try! JSONEncoder().encode(registerUserRequest)
70-
let request = HURequest(url: requestUrl!, method: .post, requestBody: registerUserBody)
70+
let request = HURequest(withUrl: requestUrl!, forHttpMethod: .post, requestBody: registerUserBody)
7171

7272
utility.request(huRequest: request, resultType: RegisterResponse.self) { (response) in
7373
switch response
@@ -90,7 +90,7 @@ let request = PhoneRequest(color: "Red", manufacturer: nil)
9090
// using the extension to convert the encodable request structure to a query string url
9191
let requestUrl = request.convertToQueryStringUrl(urlString:"https://api-dev-scus-demo.azurewebsites.net/api/Product/GetSmartPhone")
9292

93-
let request = HURequest(url: requestUrl!, method: .get)
93+
let request = HURequest(withUrl: requestUrl!, forHttpMethod: .get)
9494
utility.request(huRequest: request, resultType: PhoneResponse.self) { (response) in
9595

9696
switch response

0 commit comments

Comments
 (0)