Advertisement
zizus89

Untitled

Mar 14th, 2023 (edited)
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.80 KB | None | 0 0
  1. def get_json_with_items
  2.     url = URI("https://parseapi.back4app.com/classes/trailer")
  3.  
  4.     https = Net::HTTP.new(url.host, url.port)
  5.     https.use_ssl = true
  6.  
  7.     request = Net::HTTP::Post.new(url)
  8.     request["authority"] = "parseapi.back4app.com"
  9.     request["referer"] = "https://transcourt.com/"
  10.     request["Content-Type"] = "text/plain"
  11.     request.body = "{\"where\":{\"status\":{\"$ne\":\"MKTING_USE_ONLY\"}},\"limit\":9999,\"order\":\"status,location,assetDescription\",\"_method\":\"GET\",\"_ApplicationId\":\"COEZJwNNPxP7Y7Try62ykyMKPZdjNs7Pvj4scM8M\",\"_JavaScriptKey\":\"05nA4wrJcPQxTrAoGbxwrpJCS1z0cEfTIzA5qvtv\",\"_ClientVersion\":\"js1.6.14\",\"_InstallationId\":\"01f06ffe-6a62-7d9c-b709-22cb22363959\"}"
  12.  
  13.     response = https.request(request)
  14.     JSON.parse(response.read_body)
  15.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement