Azure / Azure/azure-functions-durable-python
Calling Signal entity HTTP API fails with content-type=application/json
- Vorherrschende Sprache
- Python
- Sterne
- 157
- Forks
- 70
- Ø Merge
- 2 T. 10 Std.
- Gemergte PRs (30 T.)
- 2
Beschreibung
### Context
In the [http api documentation for signalling a durable entity](https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-api#signal-entity) it is stated that the request content (payload) should be JSON-formatted, implying that the Content-Type should be application/json.
Calling the API using this Content-Type=applicaton/json will throw an error in the get_input() function of the Durable entity context with the error "the JSON object must be str, bytes or bytearray, not dict"
### How to reproduce
Call the API using Content-Type = application/json
### Workaround
Call the API using Content-Type = text/plain
Beitragsleitfaden
Rechercherichtung
Beginne damit, die Verarbeitung der Signal entity HTTP API bis zur Funktion get_input() des Durable entity context nachzuverfolgen, wobei die dokumentierte Signal-entity-Anfrage und das gemeldete Content-Type-Verhalten als Reproduktion verwendet werden. Überprüfe, dass die JSON-Nutzlast mit application/json akzeptiert wird, während das bestehende text/plain-Workaround-Verhalten erhalten bleibt, und füge Abdeckung für beide Anfrageformen hinzu oder aktualisiere sie, falls die umgebenden Tests einen geeigneten Einstiegspunkt bieten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 64/100