Azure / Azure/azure-functions-durable-python

Calling Signal entity HTTP API fails with content-type=application/json

Ouverte
#346 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug fixed-in-v2 P2
Langage dominant
Python
Étoiles
157
Forks
70
Merge moyen
2 j 10 h
PR mergées (30 j)
2

Description

### 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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par suivre le traitement de la Signal entity HTTP API jusqu’à la fonction get_input() du Durable entity context, en utilisant comme reproduction la requête Signal entity documentée et le comportement de Content-Type signalé. Vérifiez que la charge utile JSON est acceptée avec application/json, tout en préservant le comportement existant du workaround text/plain, et ajoutez ou mettez à jour la couverture pour les deux formes de requête si les tests environnants fournissent un point d’entrée approprié.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
api, backend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
64/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.