How to remove HTML content from REST API response? - rest

I have started to work with REST APIs - specifically JIRA REST APIs.
I'm using the API to get response to a JIRA query but the JSON response I am getting contains lot of HTML chunk inside it.
It is not clean enough as showcased here
How can I use it in such a way to get a proper JSON response?

I think, JIRA response in JSON format only if request is successful, if request has any error than it comes in HTML response. actually that html belongs to the JIRA's error page. So correct your request, you will not get any response in HTML fomat. :)

Related

Are POST requests with Content-Disposition header supported in Postman?

I did some research both in the Postman GUI (auto-completion for request headers which does not offer "Content-Disposition") and in learning.postman.com/docs and there is no mention of "Content-Disposition" request header. I am using this request header in a POST request to upload a PDF file to an existing document. The operation is successful. But this is currently being done in a Jersey REST client Java project. I'm trying to create a similar POST REST request in Postman as part of a test collection.
Any workaround for this or just not supported? The "standard" multipart/form-data example cited everywhere and including Postman docs/examples is not supported by this upload POST API.
The Java/REST client code was based on this SO code: Upload file via streaming using Jersey 2 only difference in my client I am using "application/pdf" as MediaType.

Replicatiing post request from website form using postman returns 500 internal server error

I'm trying to replicate a post request done normally by a website form via postman but the server returns 500 error.
the form website URL that I'm dealing with is here.
what I have done so far is investigate the network request using chrome or safari dev tools, copy the request as cURL, import the cURL in postman and do the request.
what can be the possible reasons for the failure and what are the alternative ways to achieve the same result?
Postman Headers:
Most probably you must have used invalid request body. The browser shows parsed json body and you might have copied incomple request body.
To get full body click view source and copy the full content.

SOAP UI - Attaching a multipart file in request body of rest api

In SOAP UI, I need to attach a multipart file in a rest api. I have stored responses for this api. I have seen this ans but could not get much help. I know that multipart files are sent in form-data. The documentation talks about some "attachment tab" but I can't find that in my case as I have stored responses - this link gives an idea about my rest api.

Does Syncfusion Dashboard web data source support POST http methods?

Does Syncfusion Dashboard web data source support POST http methods?
If yes, so how set it up?
Thanks!
HTTP Post requests additional data from client to server in the message body, where message body will be like JSON, XML, TEXT etc. This may result in the creation of a new resource or the updates of existing resources or both. In contrast, HTTP Get requests include all required data in the URL. So we support HTTP Get method since POST method is not valid use case.
Regards,
Umapathy S.

Neo4j REST API Get request from browser vs Get method from REST Client

Neo4j API url is: http://localhost:7474/db/data
When I use Chrome visiting this url, which is a GET request. This is the response I got
But when I use the restful client such as POSTMAN to make a g request.
This is the response I got.
My questions are
Both are GET request to the same url. Why Chrome browsing get a html page in return but Postman Request get JSON Response in return.
How Neo4j does that?
Is Neo4j using user agent detection, and if it is a browser visiting, it will give HTML page as response. And if it is a rest client request, it will give json response?
Thanks!
They use media type negotiation header. For example when requesting this site my browser sends a header like that:
Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
As you can see it accepts primarily html, if that's not available then xhtml, then pure xml, and if that's not available - it accepts whatever the server can throw at it. Neo4j's website tries to serve content in that order. Postman likely just specifies application/json, or nothing at all (the application determines the default media type then), hence the response.