question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Device Registry REST API: "enabled" field cannot be created/updated via POST/PUT request with urlencoded form data input

See original GitHub issue

When trying to create/update device registration data that has “enabled” set to “false”, there is a 400 “bad request” response if the request was made with urlencoded form data input.

Example:

curl -i -X POST -d device_id=4711 -d enabled=false http://127.0.0.1:8080/registration/DEFAULT_TENANT

Internally there is a “ClassCastException: String cannot be cast to Boolean” in BaseRegistrationService.getRequestPayload().

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
sophokles73commented, Sep 26, 2017

@dejanb @ppatierno @pellmann @sysexcontrol any opinion on this? I would like to remove the form encoded parameter passing in the REST adapter altogether. WDYT?

0reactions
sophokles73commented, Oct 4, 2017

fixed in 70c8d00941d8db8537a5cd43e2506910ab23a8a6

Read more comments on GitHub >

github_iconTop Results From Across the Web

Device Registry REST API: "enabled" field cannot be ... - GitHub
Device Registry REST API: "enabled" field cannot be created/updated via POST/PUT request with urlencoded form data input #316.
Read more >
[REST API] Form URL Encoded Requests - 'List' Type Input ...
Error Message: Cannot send a 'List' parameter in the request 'Body' of a method with 'Form URL Encoded' request format.
Read more >
REST API Developer Guide
You can use REST API tools to create, manipulate, and search data in Salesforce by sending HTTP requests to endpoints in Salesforce.
Read more >
Calling third-party REST APIs in a Remedy application
This panel enables you to send data from the AR form field and receive a JSON response. To add fields from the AR...
Read more >
REST API Reference Guide - NetSuite OpenAir
This guide provides a reference for using OpenAir REST API. ... Request Format — Review how to form your API requests.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found