คำถามติดแท็ก httparty

2
โพสต์ JSON เป็น API โดยใช้ Rails และ HTTParty
ฉันต้องการให้ผู้ใช้ภายในแอป Ruby on rail สามารถส่งตั๋วไปยังระบบจัดการตั๋วภายนอกของฉัน squishlist.com ได้ พวกเขามี api และคำแนะนำดังนี้ คุณต้องตรวจสอบสิทธิ์และรับโทเค็นจากนั้นจึงส่งตั๋วพร้อมโทเค็น จาก squishlist. # get the token https://api.squishlist.com/auth/?cfg=testcorp&user_key=privatekey&api_key=TEST-KEY-12345 => {"token": "authtoken", "expires": "2010-06-16 13:31:56"} # and then the ticket with the token https://api.squishlist.com/rest/?cfg=testcorp&token=authtoken&method=squish.issue.submit&prj=demo POST data: {'issue_type': 1, 'subject': 'Hello, world.', 4: 'Open', 5: 10} เพื่อวัตถุประสงค์ในการทดสอบฉันได้สร้างตัวควบคุมเส้นทางและมุมมอง (หน้า) สำหรับการทดสอบ บนคอนโทรลเลอร์ของฉันฉันมีสิ่งต่อไปนี้ require 'httparty' …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.