@@ -181,47 +181,47 @@ describe('basics', () => {
181
181
182
182
it ( 'does not pass auth with diff hostname redirects' , async done => {
183
183
let headers = {
184
- " accept" : " application/json" ,
185
- " authorization" : " shhh"
184
+ accept : ' application/json' ,
185
+ authorization : ' shhh'
186
186
}
187
187
let res : httpm . HttpClientResponse = await _http . get (
188
188
'https://httpbin.org/redirect-to?url=' +
189
189
encodeURIComponent ( 'https://www.httpbin.org/get' ) ,
190
- headers
190
+ headers
191
191
)
192
192
193
193
expect ( res . message . statusCode ) . toBe ( 200 )
194
194
let body : string = await res . readBody ( )
195
195
let obj : any = JSON . parse ( body )
196
196
// httpbin "fixes" the casing
197
- expect ( obj . headers [ " Authorization" ] ) . toBeUndefined ( )
198
- expect ( obj . headers [ " authorization" ] ) . toBeUndefined ( )
197
+ expect ( obj . headers [ ' Authorization' ] ) . toBeUndefined ( )
198
+ expect ( obj . headers [ ' authorization' ] ) . toBeUndefined ( )
199
199
expect ( obj . url ) . toBe ( 'https://www.httpbin.org/get' )
200
200
201
201
done ( )
202
202
} )
203
-
203
+
204
204
it ( 'does not pass Auth with diff hostname redirects' , async done => {
205
205
let headers = {
206
- " Accept" : " application/json" ,
207
- " Authorization" : " shhh"
206
+ Accept : ' application/json' ,
207
+ Authorization : ' shhh'
208
208
}
209
209
let res : httpm . HttpClientResponse = await _http . get (
210
210
'https://httpbin.org/redirect-to?url=' +
211
211
encodeURIComponent ( 'https://www.httpbin.org/get' ) ,
212
- headers
212
+ headers
213
213
)
214
214
215
215
expect ( res . message . statusCode ) . toBe ( 200 )
216
216
let body : string = await res . readBody ( )
217
217
let obj : any = JSON . parse ( body )
218
218
// httpbin "fixes" the casing
219
- expect ( obj . headers [ " Authorization" ] ) . toBeUndefined ( )
220
- expect ( obj . headers [ " authorization" ] ) . toBeUndefined ( )
219
+ expect ( obj . headers [ ' Authorization' ] ) . toBeUndefined ( )
220
+ expect ( obj . headers [ ' authorization' ] ) . toBeUndefined ( )
221
221
expect ( obj . url ) . toBe ( 'https://www.httpbin.org/get' )
222
222
223
223
done ( )
224
- } )
224
+ } )
225
225
226
226
it ( 'does basic head request' , async done => {
227
227
let res : httpm . HttpClientResponse = await _http . head (
0 commit comments