Function curly

Curly function

  • EXPERIMENTAL This API can change between minor releases

    Async wrapper around the Curl class.

    It's also possible to request using a specific http verb directly by using curl.<http-verb>(url: string, options?: CurlyOptions), like:

    curly.get('https://www.google.com')
    

    Type Parameters

    • ResultData = any

      You can use this to specify the type of the data property returned from this call.

    Parameters

    • url: string
    • Optionaloptions: CurlyOptions

    Returns Promise<CurlyResult<ResultData>>

Properties

acl: CurlyHttpMethodCall
bind: CurlyHttpMethodCall
checkout: CurlyHttpMethodCall
connect: CurlyHttpMethodCall
copy: CurlyHttpMethodCall
create: (defaultOptions?: CurlyOptions) => CurlyFunction

EXPERIMENTAL This API can change between minor releases

This returns a new curly with the specified options set by default.

defaultResponseBodyParsers: CurlyResponseBodyParsersProperty

These are the default response body parsers to be used.

By default there are parsers for the following:

  • application/json
  • text/*
delete: CurlyHttpMethodCall
get: CurlyHttpMethodCall
head: CurlyHttpMethodCall
link: CurlyHttpMethodCall
lock: CurlyHttpMethodCall
"m-search": CurlyHttpMethodCall
merge: CurlyHttpMethodCall
mkactivity: CurlyHttpMethodCall
mkcalendar: CurlyHttpMethodCall
mkcol: CurlyHttpMethodCall
move: CurlyHttpMethodCall
notify: CurlyHttpMethodCall
options: CurlyHttpMethodCall
patch: CurlyHttpMethodCall
post: CurlyHttpMethodCall
propfind: CurlyHttpMethodCall
proppatch: CurlyHttpMethodCall
purge: CurlyHttpMethodCall
put: CurlyHttpMethodCall
rebind: CurlyHttpMethodCall
report: CurlyHttpMethodCall
search: CurlyHttpMethodCall
source: CurlyHttpMethodCall
subscribe: CurlyHttpMethodCall
trace: CurlyHttpMethodCall
unbind: CurlyHttpMethodCall
unlink: CurlyHttpMethodCall
unlock: CurlyHttpMethodCall
unsubscribe: CurlyHttpMethodCall