Skip to content

Commit 8ad4e39

Browse files
committed
Web.AsyncHTTP: Rename callback key to userCallback.
1 parent 408d7c2 commit 8ad4e39

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

autoload/vital/__vital__/Web/AsyncHTTP.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ function! s:_request_cb(settings, responses, exit_code) abort
3535

3636
call map(a:responses, 's:Core.build_response(v:val[0], v:val[1])')
3737
let last_response = s:Core.build_last_response(a:responses)
38-
if has_key(a:settings, 'user_cb')
39-
call a:settings.user_cb(last_response)
38+
if has_key(a:settings, 'userCallback')
39+
call a:settings.userCallback(last_response)
4040
endif
4141
endfunction
4242

doc/vital/Web/AsyncHTTP.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ request({method}, {url} [, {settings}])
4646
4747
call s:AsyncHTTP.request({
4848
\ 'url': 'https://example.com',
49-
\ 'user_cb': function('s:user_cb'),
49+
\ 'userCallback': function('s:user_cb'),
5050
\ })
5151
<
5252
{settings} is a |Dictionary| which contains the following items:
@@ -128,7 +128,7 @@ request({method}, {url} [, {settings}])
128128
"unixSocket" Default: (None)
129129
Use --unix-sokect (only curl >= 7.40.0)
130130

131-
"user_cb" Default: (None)
131+
"userCallback" Default: (None)
132132
A |function| of callback function called when the process
133133
outputs some data. The callback function has one argument,
134134
response(|Dictionary| of response).

0 commit comments

Comments
 (0)