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

[feature request] Posting form data #31

Open
svanimpe opened this issue Jun 21, 2018 · 2 comments
Open

[feature request] Posting form data #31

svanimpe opened this issue Jun 21, 2018 · 2 comments

Comments

@svanimpe
Copy link

I can't seem to find an easy way to POST form data other than URL encoding the form myself and converting the String to bytes. Would it be possible to add an API to automate this?

@ianpartridge
Copy link
Contributor

Sounds like a useful feature. I don't think we have immediate plans to work on this though I'm afraid.

@ianpartridge ianpartridge changed the title Posting form data [feature request] Posting form data Aug 17, 2018
@Andrew-Lees11
Copy link
Contributor

Just to say that if you need to URL encode a form you can use the QueryEncoder/Decoder in Kitura-Contracts. These take any Codable type and will encode them to application/x-www-form-urlencoded in the same way the JSONEncoder/JSONDecoder work.
You can then pass this Data to SwiftyRequest. This isn't as easy an it's own API but I hope an encoder/decoder make the process of creating the URL Encoded data easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants