Home > Net >  Bad Request - Invalid Header
Bad Request - Invalid Header

Time:10-13

Receive a post request, the content-type: text/HTML. Charset - utf-8
The content-type: application/json
The content-type is two values, the interface now return error


Bad Request
<meta HTTP - EQUIV="content-type" Content="text/HTML. Charset=us - ASCII "& gt;

<body>


HTTP Error 400. The request has an invalid header name. & lt;/p>


How can let interface can receive two the content-type, if the content-type is a normal

CodePudding user response:

Then use two requests

CodePudding user response:

Is only one contentype, notice now are two contentype to how to make interface support two contenttype

CodePudding user response:

reference 1st floor EdsionWang response:
then use two requests
is only one contentype, notice now are two contentype to how to make interface support two contenttype

CodePudding user response:

The content-type is to identify the type of the HTTP request you, y a HTTP request can only have one type, your request can't picture type and string type?
Let the caller to request, you don't have to change

CodePudding user response:

reference 4 floor vin_Lee response:
the content-type is to identify the type of the HTTP request you, y a HTTP request can only have one type, your request can't picture type and string type?
Let the caller to request, you don't have to change

Call is a Java program, it and other calls are so are normal,

CodePudding user response:

With postmen set, and then write code

Also somebody else Java can say, that's not a problem, ask him to give the postman test, or let he he thinks the Fiddler intercepted a may submit the correct packet

CodePudding user response:

Postman two the content-type is I can't, please don't fill is the content-type can, now you mean Java program is also such a notice this notice, interface to others is done,
  • Related