Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$xhr posts JSON data as form-urlencoded #395

Closed
@efleming969

Description

@efleming969

When posting an object via $xhr

$xhr('/some/uri', 'POST', {some:'object'});

The default behavior is to encode that object as JSON. This would be fine if the default Content-Type of $browser.xhr was application/json, but it's application/x-www-form-urlencoded.

Since you can't set the Content-Type via $xhr (see #180), then this feature is virtually unusable, confusing and probably an inappropriate default.

Solution is to urlencode the object instead of JSON

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions