Skip to content

Conversation

@viable-hartman
Copy link

I added some features that allow you to POST/PUT json directly to APIs, as well as modify the URLs via patterns in your models.

This is helpful for:

  • Calling APIs that don't fit nicely with the REST / CRUD paradigm.
  • Transforming non REST / CRUD legacy APIs into REST / CRUD APIs useful to MVC frameworks.
  • Calling APIs that require JSON as their body payload instead of parameters.

I also added the ability to pass custom headers and optionally remove the trailing '/' from REST urls as some legacy APIs didn't route correctly with a trailing '/'

to give the end-user better control over calling their REST APIs in
case they don't follow the standard CRUD model.  This allows for calls
like base_url+'/some_string_or_different_format/or_different_path_entirely'.

Added a feature to allow striping the trailing '/' from the API url if desired.

Added a feature to allow passing custom HEADERS with the API calls.

Modified, base functions to also allow passing a JSON body to an api call
instead of just parameters, as some APIs take strictly JSON.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant