Sha256: d76a605be077fc37679800f6a9504485302dd653d5dd880193fb5bd370a9bab8
Contents?: true
Size: 1.31 KB
Versions: 14
Compression:
Stored size: 1.31 KB
Contents
module App42::Base module HttpHelper # post request to rest client def post_request body, signed, rest_url, params @connection.post(signed, rest_url, params, body) end # put request to rest client def put_request body, signed, rest_url, params @connection.put(signed, rest_url, params, body) end # get request to rest client def get_request signed, rest_url, params @connection.get(signed, rest_url, params) end # delete request to rest client def delete_request signed, rest_url, params @connection.delete(signed, rest_url, params) end # build post request def build_post_request body, query_params, resource, action response = post_request body, signature(query_params), resource_url(resource, action), query_params end # build put request def build_put_request body, query_params, resource, action response = put_request body, signature(query_params), resource_url(resource, action), query_params end # build get request def build_get_request query_params, resource, action response = get_request signature(query_params), resource_url(resource, action), query_params end # build delete request def build_delete_request query_params, resource, action response = delete_request signature(query_params), resource_url(resource, action), query_params end end end
Version data entries
14 entries across 14 versions & 1 rubygems