Skip to content

Instantly share code, notes, and snippets.

@causztic
Created May 28, 2020 03:29
Show Gist options
  • Select an option

  • Save causztic/fe960123cf5e1d96874e885a4c5b4160 to your computer and use it in GitHub Desktop.

Select an option

Save causztic/fe960123cf5e1d96874e885a4c5b4160 to your computer and use it in GitHub Desktop.

Revisions

  1. causztic created this gist May 28, 2020.
    14 changes: 14 additions & 0 deletions httparty_examples.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    HTTParty.post(
    "url",
    {
    headers: { "Content-Type" => "application/json " },
    query: { api_key: "some api key" },
    body: { some_data: "value" }
    }.to_json
    )

    HTTParty.post(
    "url",
    body: { some_data: "value" }
    )