File tree 2 files changed +10
-10
lines changed
packages/ra-data-simple-rest/src
2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,9 @@ describe('Data Simple REST Client', () => {
83
83
'http://localhost:3000/posts/1' ,
84
84
{
85
85
method : 'DELETE' ,
86
- headers : {
86
+ headers : new Headers ( {
87
87
'Content-Type' : 'text/plain' ,
88
- } ,
88
+ } ) ,
89
89
}
90
90
) ;
91
91
} ) ;
@@ -104,19 +104,19 @@ describe('Data Simple REST Client', () => {
104
104
'http://localhost:3000/posts/1' ,
105
105
{
106
106
method : 'DELETE' ,
107
- headers : {
107
+ headers : new Headers ( {
108
108
'Content-Type' : 'text/plain' ,
109
- } ,
109
+ } ) ,
110
110
}
111
111
) ;
112
112
113
113
expect ( httpClient ) . toHaveBeenCalledWith (
114
114
'http://localhost:3000/posts/2' ,
115
115
{
116
116
method : 'DELETE' ,
117
- headers : {
117
+ headers : new Headers ( {
118
118
'Content-Type' : 'text/plain' ,
119
- } ,
119
+ } ) ,
120
120
}
121
121
) ;
122
122
} ) ;
Original file line number Diff line number Diff line change @@ -166,9 +166,9 @@ export default (
166
166
delete : ( resource , params ) =>
167
167
httpClient ( `${ apiUrl } /${ resource } /${ params . id } ` , {
168
168
method : 'DELETE' ,
169
- headers : {
169
+ headers : new Headers ( {
170
170
'Content-Type' : 'text/plain' ,
171
- } ,
171
+ } ) ,
172
172
} ) . then ( ( { json } ) => ( { data : json } ) ) ,
173
173
174
174
// simple-rest doesn't handle filters on DELETE route, so we fallback to calling DELETE n times instead
@@ -177,9 +177,9 @@ export default (
177
177
params . ids . map ( id =>
178
178
httpClient ( `${ apiUrl } /${ resource } /${ id } ` , {
179
179
method : 'DELETE' ,
180
- headers : {
180
+ headers : new Headers ( {
181
181
'Content-Type' : 'text/plain' ,
182
- } ,
182
+ } ) ,
183
183
} )
184
184
)
185
185
) . then ( responses => ( {
You can’t perform that action at this time.
0 commit comments