search

Home  >  Q&A  >  body text

javascript - Angular's http request reports 400 error?


The interface provided by the background is like this. After I wrote it, I reported a 400 error. I checked that the format was the same as the one he requested. Where did I go wrong?

我想大声告诉你我想大声告诉你2708 days ago792

reply all(4)I'll reply

  • 高洛峰

    高洛峰2017-06-20 10:08:10

    URL must be complete, address and port number items

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-20 10:08:10

    Try setting the header in $http

    headers: {
      'Content-Type': 'application/json'
    }

    reply
    0
  • 为情所困

    为情所困2017-06-20 10:08:10

    Request path problem

    reply
    0
  • 代言

    代言2017-06-20 10:08:10

    Your http request is a local address. You should request the server address

    reply
    0
  • Cancelreply