Find a way to figure out we want to GET or POST for QA resource
For now we're doing:
def fabricate_via_api!(*_args)
resource_web_url(api_get)
rescue ResourceNotFoundError
resource_web_url(api_post)
end
But it feels weird and not clear about the intention.
The following discussion from !21302 (merged) should be addressed:
-
@godfat started a discussion: (+2 comments) Sorry that I should bring this up earlier, but it feels weird that we're rescuing this and fallback to post. Would you think that it makes sense that we detect this up-front? Maybe like:
resource_web_url(api_get || api_post)
?
And in
api_get
we:def api_get return unless api_get_path # ... end
And in
api_get_path
we try to detect if we could retrieve the resource by checking if we have theid
orpath
set?I guess we could do this in the next iteration maybe?