Send POST json data to an url with POSTMAN not working - postman

I have python code wrote here: https://repl.it/#AndreiCiobnic/MixedWealthyGnuassembler
I'm trying to (re)write in Postman to make a POST request to that url.
I put like:
But I got error response from that server.
How to send the data json in Postman ?

Related

How to get content of the post request file POSTMAN

I have a problem with sending files to some API. When I do it via my server some pdf files send correctly but some not. But when I send the same pdf via POSTMAN everything works just fine. I am not sure what is the reason (probably POSTMAN encodes it into base64 but from my server, I send it in binary - just a guess). Is there a way to get the sent request file content from postman so that I can imitate it and compare with the request on my server?

How to convert sample request and response xml text into postman request

Now I have a text file(xml format) as a document for test some web applications but I don't know how to use it in Postman request also not able to import it .
request urls
sample request and response xml code
You can do so via pre-request setup.
You can check the documentation: https://www.postman.com/postman/workspace/postman-answers/documentation/9215231-c7c99fbb-b7f9-48a5-8ddc-192e0f8194e4

can i get a different response from postman example

let's me explain
i'm using mock server in post man for testing login post
so i set header to [x-api-key : {{postman-api-key}} //(i already got my api key from postman)
and I set Body request and response like this
my question is : If i post wrong password from body request can i set body response to show (error ,Password incorrect) form other example it's possible?
There is any To samples for me?

How to upload image using raw in POSTMAN?

I am trying to upload an image using POSTMAN. I succeed with form-data but not with passing data in raw JSON format.
request through form-data in POSTMAN:
request through curl:
curl -X POST -H "Content-Type:multipart/form-data" -F "profile_image=#/home/shivani/Pictures/Wallpapers/8018.jpg" http://127.0.0.1:8000/api/users/1/image/
{"message":"Image Uploaded successfully.","profile_image":"http://res.cloudinary.com/aubergine-solutions/image/upload/v1430204993/w0oxhv6beaxd14twrxmi.jpg"}~
When I send request in raw as:
I get the following error though i have added MultiPartParser in Django settings:
Can anybody help to solve this problem?
When i'm using the image upload, i encoded the image using base64,and that encoded string is passed as json string.In the backend we can decoded the string and make the image.Try this, i think it works.

Send post data in a DELETE request from Django-tastypie testing client

I'm trying to test a REST request using tastypie ResourceTestCase and api_client,
but it has a different behaviour from using angular js, for example.
The data sent for a DELETE request comes in GET parameters of the request using the api_client, but when I use angular it comes from raw POST data, how can I change the behaviour of Tastypie to acts like I expect? that is sending the data in the raw post data?
The current code:
response = self.api_client.delete(url,
format='json',
authentication=self.credentials,
data=data)