Win a copy of High Performance Python for Data Analytics this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Request Param in boolean how should I handle it in POSTMAN ?

 
Ranch Hand
Posts: 717
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am afraid my brain is not so agile I just can't wrap my head in this.

So, I was asked to produce another end point with the input parameters = boolean in Order class which has instance Variable Enum  status : APPROVED, DELIVERED AND PENDING.

In a put request, how do I make it work ?

Should I just use Postman to do a key value with status and approved

And then after creating a order for testing, I then entered the body said from APPROVED TO delivered ?

Will that work ?  Will Postman be able to read the key value and the body with the Approved changed to delivered concurrently ?

I am really not used to Postman testing so hope to have some hints on this.

Tks.



 
Bartender
Posts: 2011
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
PUT is for posting new resources or updating existing resource.
If you want to use Postman, you can add a JSON as a request body.
Or, you may be able to find some Postman tutorials.

Here are the reference:
https://spring.io/guides/tutorials/rest/
 
Marshal
Posts: 3355
492
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

tangara goh wrote:I was asked to produce another end point with the input parameters = boolean in Order class which has instance Variable Enum  status : APPROVED, DELIVERED AND PENDING.


Is the Order resource specified in the request or the response?
Is the boolean value part of the Order resource, or is it outside of the resource and used to indicate how the request should be processed, or maybe part of the response to indicate the outcome of the request?

tangara goh wrote:In a put request, how do I make it work ?


Generally a POST method is used to create a new resource, and a PUT method is used to update an existing resource (although PUT is sometimes used to create a new resource if the resource identifier is provided by the requestor).  Are you creating a new resource, or updating an existing resource?

tangara goh wrote:Should I just use Postman to do a key value with status and approved


Does key value mean that you would be putting information in the HTTP header (for the request and/or response), or do you mean a key/value pair in a JSON or other type of structure?

tangara goh wrote:Will Postman be able to read the key value and the body with the Approved changed to delivered concurrently ?


Postman really just takes your input, builds a HTTP request, sends the request to the server, receives the response, and then lightly parses and displays the received information.  The application data specified in a request or response can be included in the HTTP headers (normally metadata, not resource data) and/or the body.
 
He's my best friend. Not yours. Mine. You can have this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic