Skip to content

Instantly share code, notes, and snippets.

@ahmad19
Created October 21, 2020 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmad19/594022150dc3a21df7e0ef6f3cc9bf87 to your computer and use it in GitHub Desktop.
Save ahmad19/594022150dc3a21df7e0ef6f3cc9bf87 to your computer and use it in GitHub Desktop.
Put request with correct headers and params in order to send array as parameters in request body.
put(
"/admin/prizes.json",
headers: { 'CONTENT_TYPE' => 'application/json; charset=UTF-8' },
params: { prizes: [] }.to_json
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment