File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 8888 (select-keys parameter-kvs query-header-form-data-params))))
8989
9090(defn build-request-map
91- [endpoint op-info op-map]
91+ [endpoint global-params op-info op-map]
9292 (let [{:keys [request timeout as]} op-map
9393 base-req (cond-> {:method (::descriptor/http-method op-info)
9494 :uri (str (::descriptor/url endpoint)
9898 as (assoc :as as))]
9999 (with-request-parameters
100100 base-req
101- (::descriptor/parameters op-info)
101+ (merge global-params
102+ (::descriptor/parameters op-info))
102103 (::descriptor/request op-info)
103104 request)))
104105
123124(defn op-request-map
124125 [cinfo op-map]
125126 (if-let [op-descriptor (get-op-descriptor cinfo (:op op-map))]
126- (let [request (try
127+ (let [endpoint (get-in cinfo [:compute.gcp.api/api-descriptor ::descriptor/endpoint ])
128+ global-params (get-in cinfo [:compute.gcp.api/api-descriptor ::descriptor/parameters ])
129+ request (try
127130 (build-request-map
128- (get-in cinfo [:compute.gcp.api/api-descriptor ::descriptor/endpoint ])
129- op-descriptor
130- op-map)
131+ endpoint
132+ global-params
133+ op-descriptor
134+ op-map)
131135 (catch Exception ex
132136 {::anom/category ::anom/fault
133137 ::anom/message (str " Exception while creating the HTTP request map. " (.getMessage ex))
You can’t perform that action at this time.
0 commit comments