Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add convenience methods for sending Client requests with a Content body #2770

Merged
merged 2 commits into from
Jan 27, 2022

Conversation

owainhunt
Copy link
Contributor

@owainhunt owainhunt commented Jan 27, 2022

Adds post, put and patch convenience functions for sending Client requests with a Content body.

E.g.

struct MyData: Content {
  let title: String
  let count: Int
}

let myData = MyData(...)

let response = try await req.client.post(url, myData)

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@0xTim 0xTim added the semver-minor Contains new API label Jan 27, 2022
@0xTim 0xTim changed the title Add convenience methods for sending client requests with a Content body Add convenience methods for sending Client requests with a Content body Jan 27, 2022
@0xTim 0xTim merged commit 2d2bb29 into vapor:main Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Contains new API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants