I've tried Bitly's shortening API to shorten some URL's and after signing up and getting a username/API key, I've been able to shorten URL's in my local computer. But once, the code got deployed to a test server, the shortening fails. Any idea on what could possibly the source for this, or how to track the problem?
Try using PostMan ( chrome ) or HTTP Requestor ( firefox / my preference ) to post the JSON request you are sending to the API, review the error code and see if it has any useful errors (http://jsonformatter.curiousconcept.com/ is nice for reviewing it ).
Alternatively if you have no UI in the server use a CURL request from the server.
What language are you sending this in by the way? I am assuming JSON (not XML) is being sent eventually? What kind of server is it? Could you post the error code please?
Best of Luck!
Related
I am working on a sample MEAN application where in I have started to create the node.js related files and connected the same to MongoDB. I have create a POST call which sends the json to the DB. I tried to test the api using postman but not sure whats wrong, I have checked multiple times, the api throws bad request.Any help on this is much appreciated. Thanks.
Added the relevant route.js, app.js and contact.js files for reference in stackblitz link. Added error in postman for reference.
https://stackblitz.com/edit/node-mlodls?file=app.js
Resolved the issue using postman extension. Wondering why the API doesnt work in postman software and works in postman extension
I'm using amazon chime js sdk for generating pre-signed URL for connecting to the chime websocket. When I use new WebSocket() in js, everything works well: connection gets connected, session gets started, etc. But when I'm trying open the link via postman, or an addon for Chrome, or via JAVA, it drops the connection immediately, and the response is just "4401 UNAUTHORIZED", despite the fact that URL is 100% correct.
Can somebody consult me about this?
Might it be rejected, if the user-agent in URL, and in request is different?
P.S. Sorry if my explanation is a mess.
Wrote fully working code for signing URL in JAVA. Hope this will help somebody!
i am playing around with Postman to get some insight on how things work behind the curtain and ran into, what I believe, is an issue but wanted to ask before I create a new issue on GitHub.
I am intercepting the request from my browser to the same site using the Postman Interceptor to use the request values in the native app. I have cookies enabled and the site (the whole domain) whitelisted.
When I use the history to resend the same request that was captured I get an auth error that is caused by the fact that the cookies are not included in the request (found that out by checking the cURL code snippet). I believe the reason for that is, that the cookies are set under another sub domain than that the request is send to.
I will try to include some pictures to clarify. My question here is:
Am I missing something/did I set something up in the wrong way
or is this an issue and I should create an issue in the official Postman Github page
cURL request
Cookies in Postman Native App
you should see if cookie is being send not using code snippet but the console :
its indeed sending cookies ,
I am getting familiar with both Postman and SoapUI. I already have a doubt. When I make a GET call with from the postman-echo service, I get slightly different responses shown to me in Postman and in SoapUI.
In particular, in Postman I get
"postman-token": "1ef2b330-3a46-4681-a304-d72f020cb194"
This field-value pair is not shown by SoapUI.
Can anyone explain me the apparent difference?
The parameter postman-token being added while you send a request from Postman. So, it's a custom parameter, you cannot expect it to be present with other tools.
If you check Postman doc of General settings They have explained what is that param is for:
This is primarily used to bypass a bug in Chrome. If an XmlHttpRequest
is pending and another request is sent with the same parameters then
Chrome returns the same response for both of them. Sending a random
token avoids this issue. This can also help you distinguish between
request on the server side.
You can disable it from Postman settings. Goto Settings > General > Send Postman Token header.
I have a django app built with graphene and I have a problem running a simple POST query for the GraphQL endpoint, it keeps returning a 400 Bad request syntax.
but it should work since I don't have any problems running the query from the endpoint http://localhost:8000/graphql-dev
and I can't see any issues in the way I send the postman request.
I looked online for suitable solutions but couldn't find any that would help.
Any help/tips would be greatly appreciated.
EDIT:
I still didn't manage to see why I'm having this issue with postman, but here are some observations:
first, i changed the request to GET (since in graphql, query is for GET and mutation for POST - sorry, I missed that)
I tried the same request with postman (which didn't work) and with insomnia (which did)
with postman
with insomnia
What's weird is that if i check my django console the requests look the same.
EDIT2: okay, I figured it out...removing the Content-Type application/json did the trick. Now it works with postman as well.