list_compilers Subroutine

private subroutine list_compilers(this, language_id)

Uses

    • http
  • proc~~list_compilers~~UsesGraph proc~list_compilers forcompile::compiler_explorer%list_compilers http http proc~list_compilers->http

Type Bound

compiler_explorer

Arguments

Type IntentOptional Attributes Name
class(compiler_explorer), intent(inout) :: this
character(len=*), intent(in), optional :: language_id

Calls

proc~~list_compilers~~CallsGraph proc~list_compilers forcompile::compiler_explorer%list_compilers request request proc~list_compilers->request

Contents

Source Code


Source Code

   subroutine list_compilers(this, language_id)
      use http, only: response_type, request
      class(compiler_explorer), intent(inout) :: this
      character(len=*), intent(in), optional  :: language_id
      type(response_type)                     :: response

      if (present(language_id)) then
         response = request(url=this%api_url//'/api/compilers/'//trim(language_id))
      else
         response = request(url=this%api_url//'/api/compilers')
      end if
      if(.not. response%ok) then
         print *,'Error message : ', response%err_msg
      else
         print *, 'Response Content : ', response%content
      end if
   end subroutine list_compilers