Skip to content

Allow GetJSON to take a URL as a single argument #57

@bpbecker

Description

@bpbecker

Currently GetJSON expects the first argument to be an HTTP method ('GET', 'POST', etc) and the second argument to be a URL. This extension would allow for an implied 'GET' if GetJSON is passed a single string. The following logic is used:

If the argument is a single string, since a URL has to have some non-alphabetic characters (e.g. '.' in the domain name):

  • If the string is empty or consists only of alphabetic characters, issue a "No URL supplied" error
  • Otherwise attempt to retrieve the resource using the HTTP GET method.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions