cc-api-v3-style-guide icon indicating copy to clipboard operation
cc-api-v3-style-guide copied to clipboard

Array query params feel awkward.

Open zrob opened this issue 11 years ago • 5 comments

Perhaps we could prefer ?space_guid=guidA,guidB,guidC over ?space_guids[]=guidA&space_guids[]=guidB.

zrob avatar Aug 05 '15 00:08 zrob

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/100609738.

cf-gitbot avatar Aug 05 '15 00:08 cf-gitbot

Conventions:

?space_guid=guidA,guidB,guidC

  • JSON API

?space_guids[]=guidA&space_guids[]=guidB

  • PHP
  • HTTParty

?space_guids[0]=guidA&space_guids[1]=guidB

  • Typhoeus

?space_guid=guidA&space_guid=guidB

  • HTTP.rb
  • Net::HTTP

Gerg avatar Aug 17 '15 07:08 Gerg

Via cage match:

The JSON API style was preferred because it was easier for human minds. Dieu is afraid of comma encoding.

Gerg avatar Aug 17 '15 15:08 Gerg

We are still onboard with the JSON API style lists.

Gerg avatar Aug 21 '15 21:08 Gerg

Style guide already seems consistent with JSON API style lists, based on previous changes.

jeffpak avatar Aug 27 '15 00:08 jeffpak