Patch - AppDaddy-Software-Solutions-Inc/framework-markup-language GitHub Wiki
<PATCH/> : Http
The PATCH datasource widget is used to update a piece of data via an API endpoint using the standard HTTP PATCH method, similar to PUT but more selective and thus using less bandwidth. Like all HTTP methods, PATCH can also return bindable response data upon succeeding. Response can be returned as JSON or XML(default).
- Overview
- Usage
- Attributes :: HttpDataSource (inherited attributes)
- Methods :: HttpDataSource (inherited attributes)
- Examples - Example #1 - Example #2
- Other Widgets You May Find Useful:
The PATCH widget is used to make selective change to and endpoint and automatically modify a data document within a FORM using FormField widget id's and the <FormID>.complete() event, or patch a manually built data document inside of the framework using <id>.start() on the datasource using bindings and xml tags. All HTTP datasources can have multiple TRANSFORM widgets to selectively transform data that is returned from the call.
- To modify a specific selection of data via an api.
- To receive response data after the update task.
- FormField IDs will be the surrounding their value when
complete()orsave()is called on the form.
Attributes :: HttpDataSource (inherited attributes)
| Name | Type | Default | Description | Req |
|---|---|---|---|---|
| body | string | null | The outer wrapper of the posting document tags. Used as an XML tag when defining a document manually, or attribute when creating the body automatically via a FORM
|
Methods :: HttpDataSource (inherited attributes)
| Name | Type | Default | Description | Req |
|---|
<PATCH id="P1" url="api/users/update">
<BODY>
<USER key="{KEY}">
<PHONE>{PHONE}</PHONE>
<USER>
</BODY>
</PATCH>
<INPUT id="KEY" text="Enter User Key"/>
<INPUT id="PHONE" text="Enter User Phone"/>
<BUTTON text="Submit" onclick="P1.start()"/><PATCH id="P2" url="api/users/update">
<HEADERS>
<HEADER key="content-type" value="application/json"/>
</HEADERS>
<BODY>
<![CDATA[
{"USER" : "key": "{KEY}", "phone" : "{PHONE}"}
]]>
</BODY>
</PATCH>
<INPUT id="KEY" text="Enter User Key"/>
<INPUT id="PHONE" text="Enter User Phone"/>
<BUTTON text="Submit" onclick="P2.start()"/>