Closed theabhishek2511 closed 7 years ago
Hi @theabhishek2511,
Yes indeed :) Content-Type: application/x-www-form-urlencoded is the default for requests.
For instance
ws.post(“discussion/1234/messages”, params: ["message": "Hello there"])
Concerning Content-Type: multipart/form-data useful for uploading files, look for the multipart version like so :
ws.postMultipart("/upload/avatar", params: ["foo": "bar"], name: "file", data: data, fileName: "photo.jpg", mimeType: "image/jpeg")
Hope it helps ;)
Thank you!
can't seem to figure out if these are supported or not at the moment. can ws do these?