SkillAgentSearch skills...

Fable.Requests

Fable library for making HTTP requests targeting Python

Install / Use

/learn @Zaid-Ajaj/Fable.Requests
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Fable.Requests Nuget

Fable library for making HTTP requests targeting Python and using the requests library under the hood.

This is the initial release still of the library and the API is subject to change. Use at your own risk. Contributions are welcome!

open Fable.Requests

let response = Requests.get "https://api.thecatapi.com/v1/images/search"

printfn $"Status code: {response.statusCode}"
printfn $"Response: {response.text}"

There are these functions:

  • Request.get(url: string, ?headers:Map<string, string>)
  • Request.post(url: string, ?data: string, ?headers:Map<string, string>)
  • Request.put(url: string, ?data: string, ?headers:Map<string, string>)
  • Request.delete(url: string, ?data: string, ?headers:Map<string, string>)
  • Request.head(url: string, ?data: string, ?headers:Map<string, string>)
  • Request.options(url: string, ?data: string, ?headers:Map<string, string>)

Installation

You can install this library using Femto when you are using Poetry to manage your Python dependencies

femto install Fable.Requests

Alternatively, you can install it manually

dotnet add package Fable.Requests
poetry add requests@2.28.1

Compile and run your project

Requires Fable v4 (snake island)

cd ./path/to/proj
dotnet fable --lang python
poetry run python program.py
View on GitHub
GitHub Stars4
CategoryDevelopment
Updated3y ago
Forks0

Languages

F#

Security Score

70/100

Audited on Sep 6, 2022

No findings