-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation #72
Comments
Hello, I am a web developer working in ASP.net applications but have never worked in F#. I was able to successfully build the project and dont know how to use it. I didn't know a place to communicate so posting comment on this issue item. Thanks, |
FsHttp is no alternative to Asp.Net or any other content hosting / server side web framework. It’s a HTTP client library, that allows for sending HTTP requests to a web service. |
Thanks for clarification. I was working with MS Support guy and he recommended to go through this link and found FSHTTP reference there. Thanks. Thanks, |
I doubt that the answer intentionally referenced FsHttp. Maybe it was a mistake and „sftp“ instead of „FsHttp“ was meant? |
I have only just started making use of the library, and the lack of multipart documentation lead to me almost dropping it. I assumed it simply wasn't supported. Excited to give it a go, think I'll be making use of source as a reference, unless you have made a start on some branch? This library is fantastic, thank you for all the effort! |
That would be really great, @FlippievanDyk - and thank you for the feedback. The documentation is something that definitely needs to be improved. Here are some thoughts and hints:
HowTo: Edit and build the documentation
I really appreciate your help, and you can write here or DM me any time. Thank you very much! |
I've taken a closer look at the docs now, and I have a few thoughts on what could be done. First two questions.
Then on to your hints:
I think I tend to agree with this statement. For example, there are separate get, get with cache-control and a post with a body. These could conceivably have been one, with a more detailed explanation. Perhaps it would be appropriate to have a general example, even if conceited, too show as much in one spot, with an explanation. That could then be followed with a section for adding header, adding body, adding multipart form.
Again, I tend to agree. I have not used the Dsl style at all (partly due to lack of documentation, and I was slightly rushed). I think adding better docs for the DSL style would help.
I have seen a TODO or two, but I must honest I've only skimmed the docs back to front, I haven't read everything yet. I think you are better qualified than I to say what is still relevant there. What I've done so far: I've only added this small section in Making Requests (**
Here is an example of a POST with a multipart form:
*)
http {
POST "https://reqres.in/api/fileUplod"
multipart
filePart "proofOfPayment.pdf"
} I am not sure really where to document it more fully... I see in #86 that the Full APi reference is broken. Linking to that from where Header, Body and Multipart are explained would help a lot I think. |
For this library, my feeling is that having good examples should be the essential thing for a good documentation, since most of the used concepts are easy to understand. So let's focus on good examples. To keep things simple, the current docu could be reworked:
Structure
Hints
http {
POST "https://reqres.in/api/users"
CacheControl "no-cache"
body
}
post "https://reqres.in/api/users" {
CacheControl "no-cache"
body
}
Http.post "https://reqres.in/api/users"
|> Header.cacheControl "no-cache"
|> Request.send
|> Response.toJson |
I'm sorry I have taken so long to respond, had a bunch on my plate after hours, so haven't had a real chance to look at this. I should have time this weekend to at least make a start. Anything I say further now won't be well thought out, so I'll rather not. Just wanted to let you know I haven't forgotten |
There's no need for making pressure; you can always decide ad hoc what / if you want to do something - that's no problem... I also started with some smaller docu things, but didn't commit them yet. I try to commit them this evening and comment here and let you know :) |
FYI @FlippievanDyk I just pushed my latest docu changes. |
Just wanted to confirm... the docs at https://fsprojects.github.io/FsHttp/ describe the upcoming v9 release (that's what I understood from https://fsprojects.github.io/FsHttp/08_Migrations.html ) whereas the latest at NuGet is 8.0.1? What might be the best way to learn how to use the latest NuGet 8.0.1? To read |
Thanks @nodakai - I'll release v9 this evening. I thought having it released much earlier - so sorry for not having made a feature branch. |
Oh no need to apologize, thank you for all your efforts! I hope I can contribute a few paragraphs to the doc after I play with the v9 release |
9.0.1 is released, and also an updated docu (which is far from complete as usual). Please give it a try - feedback appreciated! |
see #101 |
Clarify this in the docu: https://fsharp.slack.com/archives/C1R558VK7/p1653141311336839 |
The text was updated successfully, but these errors were encountered: