Skip to content

this is a example code snippet of using HttpExchange annotations

Notifications You must be signed in to change notification settings

kunxie/Example-HttpExchange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example-HttpExchange

this is a example code snippet of HttpExchange annotations

user cases:

  • normal get request with path params and query params
  • dynamically generate url with get requests
  • normal post requests with path params and query params, and post body
  • dynamically set headers
  • TODO: logging - writing customer filters for now, maybe there are better solution later.
  • TODO: error handling
    • @ControllerAdvice + @ExceptionHandler is not working for the reactive WebClient
    • using try-catch block for now

Method Arguments:

  • URI
  • HttpMethod
  • @RequestHeader
  • @PathVariable
  • @RequestBody
  • @RequestParam
  • @RequestPart
  • @CookieValue

Method returns:

  • void
  • String - string of ResponseBody
  • POJO class - result of jackson deserialization of ResponseBody
  • HttpHeader
  • ResponseEntity<?>
  • Mono<?> - non-blocking mode, all above are blocking mode.

dependency

About

this is a example code snippet of using HttpExchange annotations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages