Tag Archives: Postman

Postman Error: Could not get any response [How to Solve]

During interface testing, it is inevitable to encounter some errors. For example, after the interface is executed, postman prompts could not get any response

The server could not send a response:
Make sure the backend is working
The self-signed SSL certificate is blocked:
Fix this problem by turning off "SSL certificate verification" in Settings> General
The proxy configuration is incorrect
Make sure the proxy is configured correctly in Settings>Proxy
Request timed out:
Change request timeout setting>General

I found an error report when requesting the blog park. There was no problem before. Ha, what’s going on? Let’s take a look at the specific information that reported the error (quiet means that English is a very special dish. All find tools to translate for you)

You can see that the SSL certificate is blocked, which makes it impossible to request

Solution:

After we close this request, we will find that the request has been successful

Postman reported an error unsupported media type [How to Solve]

The error information is as follows:

{
"timestamp": "2018-12-06T01:37:11.184+0000",
"status": 415,
"error": "Unsupported Media Type",
"message": "Content type 'text/plain;charset=UTF-8' not supported",
"path": "/testgu/ycyzharry"
}

Cause of problem:

Media type refers to Internet media type, Internet media type, also known as MIME type. In the HTTP protocol message header, content type is used to represent the media type information in the specific request
for example: content type: text/HTML; charset:utf-8;
common media format types are as follows:

text/html  :HTML format
text/plain : Plain text format      
text/xml : XML format
image/gif : gif image format    
image/jpeg : jpg image format 
image/png : png image format

Media format type starting with application:

application/xhtml+xml : XHTML format
application/xml : XML data format
application/atom+xml : Atom XML aggregation format    
application/json : JSON data format
application/pdf : pdf format  
application/msword : Word document format
application/octet-stream : Binary stream data (e.g. common file downloads)
application/x-www-form-urlencoded : <form encType=""> in the default encType, form form data is encoded as key/value format and sent to the server (the default form submission format of the data)

 

Another common media format is used when uploading files:

multipart/form-data  : This format is used when file uploads are required in the form

The above is the content format of content type we often use. The message message in this example indicates that the post request does not support the “text/plain” plain text format type

Solution: select the “application/JSON” JSON data format type to send the post request, and the interface return value is successfully obtained