Created
May 23, 2022 20:18
-
-
Save mateuszbialowas/c12b1e30c05848dc3c50bbfd3515d7ae to your computer and use it in GitHub Desktop.
BSK/Create user in gorest.co.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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