Properties can be read-only and isn't required public int v ")] If your API needs you to send a Content-Length header with the request, you can disable this streaming behavior by setting the buffered argument of the attribute to true: The downside of this is that no Content-Length header is set on the request. This means you can stream a file from disk, for example, without incurring the overhead of loading the whole file into memory. For all other types, the object will be serialized using the content serializer specified in RefitSettings (JSON is the default).īy default, Refit streams the body content without buffering it.If the parameter has the attribute, the content will be URL-encoded (see form posts below).If the type is string, the string will be used directly as the content unless is set which will send it as a StringContent.If the type is Stream, the content will be streamed via StreamContent.There are four possibilities for supplying the body data, depending on the type of the parameter:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |