none
webapi批处理始终报badrequest RRS feed

  • 问题

  • POST https://xxxx.crm7.dynamics.com/api/data/v8.0/$batch HTTP/1.1
    OData-MaxVersion: 4.0
    OData-Version: 4.0
    Accept: application/json
    Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyIsImtpZCI6IjlGWERwYmZNRlQyU3ZRdVhoODQ2WVR3RUlCdyJ9.eyJhdWQiOiJodHRwczovL3B0YmkuY3JtNy5keW5hbWljcy5jb20vIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvY2ExNDczYmUtMWVlYS00NTU5LWIwYmEtZWE4NThlOTI5YmRmLyIsImlhdCI6MTQ5ODIwNzIyMiwibmJmIjoxNDk4MjA3MjIyLCJleHAiOjE0OTgyMTExMjIsImFjciI6IjEiLCJhaW8iOiJZMlpnWUdnelhpNldIN2o4ZTJCZTNBOE9mN2xsb3BkRG1BNVoyYTgvbERiSlUwK1Q2UzBBIiwiYW1yIjpbInB3ZCJdLCJhcHBpZCI6IjBkN2Q4NzFlLWY2ZjEtNDZiMi1iZjY0LThiM2YxYTUwODFlZSIsImFwcGlkYWNyIjoiMCIsImVfZXhwIjoyNjI4MDAsImZhbWlseV9uYW1lIjoi44K944OzIiwiZ2l2ZW5fbmFtZSI6IuOCqyIsImlwYWRkciI6IjEyNC43NC4xMDguMTU4IiwibmFtZSI6IuWtqyDkvbMiLCJvaWQiOiIwMWFiNTM0OC01ZTI3LTRiYzctYTA2YS04NzA0NGQ1NTlkODEiLCJvbnByZW1fc2lkIjoiUy0xLTUtMjEtMTk2NDMyMjU4Mi0yOTQyOTA1My05Njg5MTIwMzctMjAyOTEyIiwicGxhdGYiOiIzIiwicHVpZCI6IjEwMDMwMDAwQTE4RUQxQzAiLCJzY3AiOiJ1c2VyX2ltcGVyc29uYXRpb24iLCJzdWIiOiIyZFN0cVhWN2FaWFBjU1pyQUJNUi1pai1zWDlxeE56aDVrRmNIYU45dE9vIiwidGlkIjoiY2ExNDczYmUtMWVlYS00NTU5LWIwYmEtZWE4NThlOTI5YmRmIiwidW5pcXVlX25hbWUiOiJwdHowMDAwMDVAZ2ludHJhLWV4LmJjLWdsZXgubmV0IiwidXBuIjoicHR6MDAwMDA1QGdpbnRyYS1leC5iYy1nbGV4Lm5ldCIsInZlciI6IjEuMCJ9.GD6VFY6mp-rvrx4hjO22oo0m0rLtMn_1zmyAKKoiIepQn5aJYf_MTU6Qn8ZJ-sf19oJuC7y16csQyksElsr39TaQRYZJiyNZXxZB-sMREOOuDlKptUU-2I3CGguJ7_0VmClP4aVaIlnWrgDLR2j-5F00utD80lItnyM4Ao7xlyup49b6un1T9sOuH7b4zuApPonJIjM38PXw-Yw3a1L6C901FVGqaDQT5MzjOkBTj_6_q0fiMYKICOuexLVd_5EYghMadP5M2N6dYBURk2jPhs6g23UzeegdqvDBeXYllDO0bSEpxCNA1galtFj9LW2Sv1-XBqSKlYK4Hb5bquV8WQ
    Content-Type: multipart/mixed; boundary="batch_32d0d46d-8cb5-4777-bfdf-cc1476579f3f"
    Host: ptbi.crm7.dynamics.com
    Content-Length: 1062
    Expect: 100-continue

    --batch_32d0d46d-8cb5-4777-bfdf-cc1476579f3f
    Content-Type: multipart/mixed; boundary="changeset_1614cd2e-76af-45b7-8d9b-0ee0f3263720"

    --changeset_1614cd2e-76af-45b7-8d9b-0ee0f3263720
    Content-Type: application/http; msgtype=request
    Content-Transfer-Encoding: binary
    Content-ID: 1

    PATCH /api/data/v8.0/new_onetimepasses(new_name='FxUD6q6y',new_onetimepassnumber='36017000059') HTTP/1.1
    Host: xxxx.crm7.dynamics.com
    Content-Type: application/json; charset=utf-8

    {
      "new_name": "FxUD6q6y",
      "new_onetimepassnumber": "36017000059"
    }
    --changeset_1614cd2e-76af-45b7-8d9b-0ee0f3263720
    Content-Type: application/http; msgtype=request
    Content-Transfer-Encoding: binary
    Content-ID: 2

    PATCH /api/data/v8.0/new_onetimepasses(new_name='HUQI1y4u',new_onetimepassnumber='36017000051') HTTP/1.1
    Host: xxxx.crm7.dynamics.com
    Content-Type: application/json; charset=utf-8

    {
      "new_name": "HUQI1y4u",
      "new_onetimepassnumber": "36017000051"
    }
    --changeset_1614cd2e-76af-45b7-8d9b-0ee0f3263720--

    --batch_32d0d46d-8cb5-4777-bfdf-cc1476579f3f--

    这里面有什么错误点吗? 微软是否有提供C#版本的源码?

    2017年6月23日 9:03