Skip to content

Instantly share code, notes, and snippets.

@mateuszbialowas
Created May 23, 2022 20:18
Show Gist options
  • Save mateuszbialowas/c12b1e30c05848dc3c50bbfd3515d7ae to your computer and use it in GitHub Desktop.
Save mateuszbialowas/c12b1e30c05848dc3c50bbfd3515d7ae to your computer and use it in GitHub Desktop.
BSK/Create user in gorest.co.in
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'json', require: false
gem 'httparty'
gem 'pry'
end
require 'httparty'
require 'pry'
response = HTTParty.post(
'https://gorest.co.in/public/v2/users',
headers: {
'Content-Type' => 'application/json',
'Authorization' => 'Bearer twójstarytoken'
},
body: {
email: 'test@testtesetteset.pl',
name: 'test',
gender: 'male',
status: 'active'
}.to_json,
http_proxyaddr: "127.0.0.1",
http_proxyport: "8080",
verify: false
)
binding.pry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment