/**
 * Flowtype definitions for Http
 * Generated by Flowgen from a Typescript Definition
 * Flowgen v1.14.1
 */

import {
  Auth,
  Context,
  FetchInit,
  NyxInit,
  Response as NyxResponse,
} from "./model";
import { Observable } from "./Observable";
declare export class Http {
  appName: string;
  auth: Auth;
  onContextUpdate: Observable<Context>;
  onError: Observable<string>;
  onLogout: Observable<void>;
  static DELETE: string;
  static GET: string;
  static POST: string;
  static PUT: string;
  constructor(data: NyxInit): this;
  setAuth(auth: Auth): void;
  getAuth(): Auth;
  getHeaders(contentType?: string): HeadersInit;
  fetch(data: FetchInit): Promise<$Rest<NyxResponse | any, { ... }>>;
  updateContext(ctx: Context): void;
  processError(error?: Error | any): NyxResponse;
}
