0

As you can see I'm successfully authenticated to my tenant as I can retreive the List info.

enter image description here

But I just can't create an item. I always get an 415 error "Usupported media type" whatever the headers I tried eg:

Content-Type: application/json;odata=verbose 
Accept: application/json;odata=verbose 
X-HTTP-Method: POST 
Authorization: Bearer eyJ0eXAiOiJKV1QiL...

Here is the Body of the request:

data:{"__metadata":{"type":"SP.Data.OiseNumListItem"},"Operateur":"opérateur","typeEquipement":"Poteau","accesDifficile":"Oui","adresse":"mon adresse","codePostal":"38100","Commune":"Grenoble","natureDeclarant":"Particulier","nomDeclarant":"Julien","emailDeclarant":"julien@gmail.com","Photo1":"blablabla.jpg photo1"}

And the result in POSTMAN

With a GET the answer is even weirder as I get a status OK with an empty body and nothing added to the list

enter image description here

What's wrong?

thx

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.