HTTP Request: Allow setting JSON encoding options #212
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
experiment
suggestion
support
Testing
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/framework#212
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
Hazaar\HTTP\Request
class will automatically encode options into JSON when the mime content type is set toapplication/json
. This uses the standard PHPjson_encode()
function with no optional flags. This creates standards compliant JSON as per ECMA-404, however there are instances where developers will have to deal with non-standards compliant systems that may require fixes being implemented via encoding flags.I propose a new function to set these flags that we be used when encoding JSON in a request.
This will store the flags and optionally a depth that will be used when calling the
json_encode()
function internally.created merge request !107 to address this issue
mentioned in merge request !107
mentioned in commit 5fe6fa5abdb500fb4441bdc670873cfab79fc02c