NGXF
  • 🚀Introduction
  • Get Started
    • Why
    • Installation
  • Concepts
    • Introduction
  • Features
    • Activated Route
    • Call
    • Init
    • Lazy
    • Keep Alive
    • Timeout
    • Track By Key
    • Repeat
    • Virtual Scroll
  • Server Interaction
    • Async
    • Cookies
    • Http
    • Socket.IO
  • Hooks
    • State Hook
    • Effect Hook
    • Reducer Hook
  • Recompose
    • Compose
  • API
    • NgxfModule
    • HttpDirective
    • RouteDirective
    • InitDirective
    • ComposeDirective
    • ReturnDirective
    • TimeoutDirective
    • CookiesDirective
    • AsyncDirective
    • LazyDirective
    • CallPipe
  • Recipes
    • Caching
    • Style Guide
  • Community
    • FAQ
    • Contributing
Powered by GitBook
On this page
  • Creating Get Request
  • Creating Post Request
  • Creating Delete Request
  • Creating Head Request
  • Creating Options Request
  • Creating Patch Request
  • Creating Put Request
  1. Server Interaction

Http

The directive is a local non-state manager that dispatches requests your http service listen to and selects data out from the response.

Creating Get Request

An GET request example in COMPONENT.template.html.

<ng-container *http="let status get 'https://...'">
  {{ status }}
</ng-container>

Also with options.

<ng-container *http="let status get 'https://...' with options">
  {{ status }}
</ng-container>

Creating Post Request

An POST request example in COMPONENT.template.html.

<ng-container *http="let status post 'https://...' send body">
  {{ status }}
</ng-container>

Also with options.

<ng-container *http="let status post 'https://...' send body with options">
  {{ status }}
</ng-container>

Creating Delete Request

An DELETE request example in COMPONENT.template.html.

<ng-container *http="let status delete 'https://...'">
  {{ status }}
</ng-container>

Also with options.

<ng-container *http="let status delete 'https://...' with options">
  {{ status }}
</ng-container>

Creating Head Request

An HEAD request example in COMPONENT.template.html.

<ng-container *http="let status head 'https://...'">
  {{ status }}
</ng-container>

Also with options.

<ng-container *http="let status head 'https://...' with options">
  {{ status }}
</ng-container>

Creating Options Request

An OPTIONS request example in COMPONENT.template.html.

<ng-container *http="let status options 'https://...'">
  {{ status }}
</ng-container>

Also with options.

<ng-container *http="let status options 'https://...' with options">
  {{ status }}
</ng-container>

Creating Patch Request

An PATCH request example in COMPONENT.template.html.

<ng-container *http="let status patch 'https://...' send body">
  {{ status }}
</ng-container>

Also with options.

<ng-container *http="let status patch 'https://...' send body with options">
  {{ status }}
</ng-container>

Creating Put Request

An PUT request example in COMPONENT.template.html.

<ng-container *http="let status put 'https://...' send body">
  {{ status }}
</ng-container>

Also with options.

<ng-container *http="let status put 'https://...' send body with options">
  {{ status }}
</ng-container>
PreviousCookiesNextSocket.IO

Last updated 6 years ago