@@ -44,11 +44,11 @@ export function csrfSafeMethod(method: string): boolean {
4444 return / ^ ( G E T | H E A D | O P T I O N S | T R A C E ) $ / . test ( method )
4545}
4646
47- const headers = R . merge ( { headers : { } } )
47+ const headers = R . mergeRight ( { headers : { } } )
4848
49- const method = R . merge ( { method : "GET" } )
49+ const method = R . mergeRight ( { method : "GET" } )
5050
51- const credentials = R . merge ( { credentials : "same-origin" } )
51+ const credentials = R . mergeRight ( { credentials : "same-origin" } )
5252
5353const setWith = R . curry ( ( path , valFunc , obj ) => R . set ( path , valFunc ( ) , obj ) )
5454
@@ -57,7 +57,7 @@ const csrfToken = R.unless(
5757 setWith ( R . lensPath ( [ "headers" , "X-CSRFToken" ] ) , ( ) => getCSRFCookie ( ) )
5858)
5959
60- const jsonHeaders = R . merge ( {
60+ const jsonHeaders = R . mergeRight ( {
6161 headers : {
6262 "Content-Type" : "application/json" ,
6363 Accept : "application/json"
@@ -130,7 +130,7 @@ const _fetchJSONWithCSRF = async (
130130 // and reject a Left.
131131 return R . compose (
132132 resolveEither ,
133- S . bimap ( R . merge ( { errorStatusCode : response . status } ) , R . identity ) ,
133+ S . bimap ( R . mergeRight ( { errorStatusCode : response . status } ) , R . identity ) ,
134134 filterE ( ( ) => response . ok ) ,
135135 parseJSON ,
136136 handleEmptyJSON
0 commit comments