Open capripot opened 3 years ago
Use HTTParty::Response#success? instead of checking for 200 since 201 is also a valid code returned by Greenhouse API.
HTTParty::Response#success?
200
201
It has been suggested by multiple contributors (e.g.: https://github.com/grnhse/greenhouse_io/pull/32/commits/fddd6a3d8d930b6ab259ecd4b285cd4c023af261) and it's done in multiple forks (e.g.: https://github.com/grnhse/greenhouse_io/commit/377e8ffe4bd8257979b657b36aba4f615af957f8, https://github.com/grnhse/greenhouse_io/commit/3b094b41cebd766f90a6d8d76fb38d1694639539, https://github.com/grnhse/greenhouse_io/commit/2718e362659d462485d58a603ba8f9f80e3d303d).
I think we can safely merge this.
Use
HTTParty::Response#success?
instead of checking for200
since201
is also a valid code returned by Greenhouse API.It has been suggested by multiple contributors (e.g.: https://github.com/grnhse/greenhouse_io/pull/32/commits/fddd6a3d8d930b6ab259ecd4b285cd4c023af261) and it's done in multiple forks (e.g.: https://github.com/grnhse/greenhouse_io/commit/377e8ffe4bd8257979b657b36aba4f615af957f8, https://github.com/grnhse/greenhouse_io/commit/3b094b41cebd766f90a6d8d76fb38d1694639539, https://github.com/grnhse/greenhouse_io/commit/2718e362659d462485d58a603ba8f9f80e3d303d).
I think we can safely merge this.