ghttp_copy_request_body_into_buffer   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm

Implementation

(bind-func ghttp_copy_request_body_into_buffer
  (lambda (request:ghttp_request* buf:i8* bufsize:i64)
    (if (null? request)
        (println "Error: request is null.")
        (let ((bytes_read (convert (ghttp_get_body_len request) i64)))
          ;;(println "HTTP status:" (ghttp_status_code request))
          (if (> bytes_read 0)
              (if (<= bytes_read bufsize)
                  (begin (memcpy buf (ghttp_get_body request) bytes_read)
                         void)
                  (begin
                    (memcpy buf (ghttp_get_body request) bufsize)
                    (println "Warning: HTTP response body (" bytes_read " bytes) is too big for buffer (" bufsize " bytes).  Dropping the rest of the body."))))))))


Back to Index

Similar Entries

  • AudioBuffer    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_concat    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_cstring    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_data_b64    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_data_b64_cstring    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_from_aiff    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_from_wave    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_malloc    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read_interp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read_interp_mix    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read_interp_pw    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read_looped    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read_looped    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_set_data_b64    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_shared_data    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • Complex_bufferize    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • Complex_bufferize    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • Complex_bufferize    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • Complex_bufferize    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • Complex_unbufferize    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • Complex_unbufferize    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • Complex_unbufferize    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • Complex_unbufferize    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • Vcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm
  • ai_load_ogl_texture_from_buffer    xtlang    /digego/extempore/tree/v0.8.9/libs/external/assimp.xtm
  • array_4_ptr_copy    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • astra_start_body    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/orbbec_test.xtm
  • audiofile_copy_samples    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • buffers    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • cl:copy-list    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • cl:tree-copy    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • copy    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • copy    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/stream.xtm
  • copy_h    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • cpClosestPointOnSegment    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/libchipmunk.xtm
  • curl_perform_request    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_request    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_request_with_auth    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_request_with_header    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • draw_color_body_frame    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/orbbec_test.xtm
  • draw_color_body_frame_with_hands    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/orbbec_test.xtm
  • fbo_create_depth_buffer    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • fbo_create_depth_buffer_rect    xtlang    /digego/extempore/tree/v0.8.9/libs/external/opengl.xtm
  • fill_buffer_with_file    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/word_count.xtm
  • get_request_handler    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • ghttp_perform_DELETE    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_perform_GET    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_perform_POST_default    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_perform_POST_json    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_perform_POST_string    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_perform_PUT_default    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_perform_PUT_json    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_perform_PUT_string    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_perform_request_with_setup_fn    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_print_request_body    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_print_request_full    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_print_request_headers    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_request_body_as_json    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_set_content_type_html    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_set_content_type_json    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_set_content_type_octet_stream    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_set_content_type_plaintext    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • ghttp_set_extempore_user_agent    xtlang    /digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm
  • glfw_get_framebuffer_height    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_get_framebuffer_width    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_swap_buffers    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • hcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm
  • hcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm
  • impc:ti:get-closure-body    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:set-closure-body    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • kinect_print_body    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/kinect2.xtm
  • kinect_update_body    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/kinect2.xtm
  • mcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • mcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • ocv_copyto    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • request    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg.xtm
  • send_request    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-request.xtm
  • set_sampler_audiobuffer    xtlang    /digego/extempore/tree/v0.8.9/libs/external/instruments_ext.xtm
  • set_up_request_socket    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg.xtm
  • sf_read_file_into_buffer    xtlang    /digego/extempore/tree/v0.8.9/libs/external/sndfile.xtm
  • string-copy    scheme    /digego/extempore/tree/v0.8.9/runtime/init.xtm
  • sys_file_copy    xtlang    /digego/extempore/tree/v0.8.9/libs/external/system.xtm
  • test_world_copy    xtlang    /digego/extempore/tree/v0.8.9/tests/core/game-of-life.xtm
  • tree-copy    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • vcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vcopy_pack    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vcopy_pack    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vcopy_unpack    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • vcopy_unpack    xtlang    /digego/extempore/tree/v0.8.9/libs/core/math.xtm
  • world_copy    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/game-of-life.xtm
  • xtmtest-result-body    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-result-body    scheme    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • xtmtest-with-fixture-body    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • xtmtest-with-fixture-body    scheme    /digego/extempore/tree/v0.8.9/libs/core/test.xtm
  • zcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm
  • zcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm
  • zcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm
  • zcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm
  • zcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm
  • zcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm
  • zcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm
  • zcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm
  • zcopy    xtlang    /digego/extempore/tree/v0.8.9/libs/base/base.xtm