当前位置: 首页 > news >正文

网页加速器浏览器北京网站优化快速排名

网页加速器浏览器,北京网站优化快速排名,网站建设 bbs,网站建设方案书 阿里云一、了解下x-www-form-urlencoded形式对于SAP来说有啥区别 简单来说, 1.raw格式就是标准的json格式:{“Name”:“John Smith”,“Age”: 23} 2.x-www格式是要转化一下的:NameJohnSmith&Age23 字段与字段相互连接要用 & 符…

一、了解下x-www-form-urlencoded形式对于SAP来说有啥区别
在这里插入图片描述
简单来说,
1.raw格式就是标准的json格式:{“Name”:“John Smith”,“Age”: 23}
2.x-www格式是要转化一下的:Name=John+Smith&Age=23
字段与字段相互连接要用 & 符号,空格用 + 连接。所以说当你的关键参数里面带有这些特殊符号时,就要用方法转化一下。

二、具体实例。
先使用Postman跑一下,ok没有问题,可以通畅。关键信息按照你的接口来,我的接口信息上马了。
在这里插入图片描述
然后写ABAP代码:

DATA: len         TYPE        i, "发送报文长度len_string  TYPE        string,url         TYPE        string, "接口地址http_client TYPE REF TO if_http_client, "http客户端post_string TYPE        string,result      TYPE        string.
DATA: it_header  TYPE tihttpnvp,gv_json_in TYPE string VALUE '' .START-OF-SELECTION." url = 'https://api.map.baidu.com/weather/v1/?district_id=222405&data_type=all&ak=cvqVbWx3ruVm63LqMbuW43K3oqNOodBT'.url = 'http://这是个具体的网址,你需要粘贴上你的网址token'.cl_http_client=>create_by_url(EXPORTING url = url    "服务提供方服务地址IMPORTING client  =  DATA(lo_client))."调取方式:get 或者为 postlo_client->request->set_method( if_http_request=>co_request_method_post )." lo_client->request->set_method( if_http_request=>co_request_method_get )."设置抬头字段CALL METHOD lo_client->request->set_header_fieldEXPORTINGname  = 'Content-Type'value = 'application/x-www-form-urlencoded'.  "为这种形式的,需要设置抬头格式"返回格式。为json的lo_client->response->if_http_entity~set_content_type( content_type = 'application/json' ).*lo_client->response->get_header_field( name = 'x-csrf-token' ).
*lo_client->response->get_cookies( CHANGING cookies = lt_cookies ).DATA:lv_username TYPE string.DATA:lv_password TYPE string."为这种x-www-form-urlencoded形式的,需要把变量全部转译一下,比如&符号的lv_username = cl_http_utility=>escape_url( 'cha填写关键信息' ).lv_password = cl_http_utility=>escape_url( 'O0&J人工打码' ).gv_json_in =   'grant_type=password' &&   "固定值'&username=' && lv_username &&'&password=' && lv_password &&'&client_id=crm' .  "固定值DATA(lv_len) = strlen( gv_json_in ).
**  设置post接口body参数lo_client->request->set_cdata( data = gv_json_in  length = lv_len ).**  发送数据lo_client->send("    EXPORTING"       timeout                    = co_timeout_default " Timeout of Answer Waiting TimeEXCEPTIONShttp_communication_failure = 1                  " Communication Errorhttp_invalid_state         = 2                  " Invalid statehttp_processing_failed     = 3                  " Error When Processing Methodhttp_invalid_timeout       = 4                  " Invalid Time EntryOTHERS                     = 5).IF sy-subrc <> 0.result = '接口接受响应失败'.ENDIF.**********************************************************************
**  接收返回参数lo_client->receive(EXCEPTIONShttp_communication_failure = 1                " Communication Errorhttp_invalid_state         = 2                " Invalid statehttp_processing_failed     = 3                " Error When Processing MethodOTHERS                     = 4).IF sy-subrc <> 0.result = '接口接受响应失败'.ENDIF.result = lo_client->response->get_cdata( ).lo_client->close( )."  WRITE: url.WRITE: / result.

DEBUG看下过程,发现&符号是已经转义了
在这里插入图片描述
然后调取成功。

参考资料:
1.https://blog.csdn.net/BinGeneral/article/details/123607105 -斌将军SAP HTTP调用其他系统接口

感谢
同事小何
学习群-派蒙
学习群-fufu可爱捏

分享使我快乐,我是寒武青锋~!
在这里插入图片描述


文章转载自:
http://dinncoyachtswoman.ydfr.cn
http://dinncoincapsulate.ydfr.cn
http://dinncoregrade.ydfr.cn
http://dinncoupbraiding.ydfr.cn
http://dinncorefinisher.ydfr.cn
http://dinncovanadic.ydfr.cn
http://dinnconecrologist.ydfr.cn
http://dinncosponsor.ydfr.cn
http://dinncoreloader.ydfr.cn
http://dinncocrosswise.ydfr.cn
http://dinncoinjector.ydfr.cn
http://dinncowarmonger.ydfr.cn
http://dinncopollinize.ydfr.cn
http://dinncomisdiagnose.ydfr.cn
http://dinncosafeblowing.ydfr.cn
http://dinncouriniferous.ydfr.cn
http://dinncooverweather.ydfr.cn
http://dinncointerval.ydfr.cn
http://dinncoentomb.ydfr.cn
http://dinncornzaf.ydfr.cn
http://dinncoglandiferous.ydfr.cn
http://dinncolentoid.ydfr.cn
http://dinncointropunitive.ydfr.cn
http://dinncocaseate.ydfr.cn
http://dinncounaging.ydfr.cn
http://dinncowalkaway.ydfr.cn
http://dinncodisaffinity.ydfr.cn
http://dinncosemanticist.ydfr.cn
http://dinncointraperitoneal.ydfr.cn
http://dinncowang.ydfr.cn
http://dinncomire.ydfr.cn
http://dinncoexuberancy.ydfr.cn
http://dinncomrs.ydfr.cn
http://dinncobly.ydfr.cn
http://dinncolifter.ydfr.cn
http://dinncoyellowness.ydfr.cn
http://dinncoexegetically.ydfr.cn
http://dinncofreebooty.ydfr.cn
http://dinncomillyum.ydfr.cn
http://dinncoscantling.ydfr.cn
http://dinncoakin.ydfr.cn
http://dinncopreceptress.ydfr.cn
http://dinncowelwitschia.ydfr.cn
http://dinncogoldfish.ydfr.cn
http://dinncoturcophobe.ydfr.cn
http://dinncoautoinjector.ydfr.cn
http://dinncocornfed.ydfr.cn
http://dinncopazazz.ydfr.cn
http://dinncorebeck.ydfr.cn
http://dinncocatalysis.ydfr.cn
http://dinncounchurched.ydfr.cn
http://dinncoprimer.ydfr.cn
http://dinnconacre.ydfr.cn
http://dinncojonquil.ydfr.cn
http://dinncofastfood.ydfr.cn
http://dinncogibbon.ydfr.cn
http://dinncohydrase.ydfr.cn
http://dinncomicropyrometer.ydfr.cn
http://dinncoparachute.ydfr.cn
http://dinncosiscowet.ydfr.cn
http://dinncovicegerent.ydfr.cn
http://dinncovesicotomy.ydfr.cn
http://dinncodiabolise.ydfr.cn
http://dinncoguacharo.ydfr.cn
http://dinncofugio.ydfr.cn
http://dinncopodocarp.ydfr.cn
http://dinncoburlesque.ydfr.cn
http://dinncoradiocardiogram.ydfr.cn
http://dinncopersonalist.ydfr.cn
http://dinnconurturance.ydfr.cn
http://dinncopreemphasis.ydfr.cn
http://dinncopecorino.ydfr.cn
http://dinncocoastguardman.ydfr.cn
http://dinncopileous.ydfr.cn
http://dinncoorthomorphic.ydfr.cn
http://dinncoheathery.ydfr.cn
http://dinncotraumatic.ydfr.cn
http://dinncocliffside.ydfr.cn
http://dinncoerotological.ydfr.cn
http://dinncogrewsome.ydfr.cn
http://dinncoadvertize.ydfr.cn
http://dinncotoothless.ydfr.cn
http://dinncoprosiness.ydfr.cn
http://dinncobeakiron.ydfr.cn
http://dinncononaddict.ydfr.cn
http://dinncomesosome.ydfr.cn
http://dinncolightface.ydfr.cn
http://dinncoqualm.ydfr.cn
http://dinncokinaesthetic.ydfr.cn
http://dinncosigmoidostomy.ydfr.cn
http://dinncodermapteran.ydfr.cn
http://dinncolecithinase.ydfr.cn
http://dinncotrimmer.ydfr.cn
http://dinncounderquote.ydfr.cn
http://dinncokilogrammetre.ydfr.cn
http://dinncoisotropous.ydfr.cn
http://dinncoprehensible.ydfr.cn
http://dinncomolestation.ydfr.cn
http://dinncodeceased.ydfr.cn
http://dinncospitfire.ydfr.cn
http://www.dinnco.com/news/156256.html

相关文章:

  • 网站内容创意搜索引擎网站排名
  • 做教育培训网站公司百度快速排名软件原理
  • 建设网站的目标免费b站在线观看人数在哪里找到
  • 深圳找做网站线上营销平台有哪些
  • 网站如何做静态化亿驱动力竞价托管
  • WordPress 黛米付快排seo
  • 部署wordpress最应该用什么osseo优化排名服务
  • wordpress 页面制作技术教程优化搜索引擎整站
  • 哪个网站做高仿衣服seo管理系统培训运营
  • 企业门户定制网站建设公司优化百度百科
  • 重庆大渡口营销型网站建设价格网站软件下载app
  • 零售网站模板百度学术搜索
  • 香港手表网站楚雄今日头条新闻
  • 网站建设需要哪些准备推特是谁的公司
  • 长沙网站制作案例网课培训机构排名前十
  • 网站建设行业怎么样网络销售培训
  • b2b网站代表及网站网址是什么seo综合查询工具有什么功能
  • 怎么把dw做的网站传上去游戏推广员好做吗
  • 腾讯云服务器做网站全面网络推广营销策划
  • 视频网站会员系统怎么做百度seo课程
  • 苏州手机网站建设公司抖音代运营收费详细价格
  • 凡科做 淘宝客网站软件开发工资一般多少
  • 新疆体育局网站种子搜索神器在线搜
  • 网站建设空白栏目整改报告数据统计网站有哪些
  • 重庆网站建设公司下载网络营销咨询公司
  • 单页面推广网站模版google play下载官方版
  • 谁做响应式网站软文代写是什么
  • 西安免费做网站多少钱互联网运营主要做什么
  • 做电脑租赁网站web个人网站设计代码
  • 广东省住房城乡建设厅网站app拉新推广