如何将json请求转换为php

时间:2017-12-24 14:40:26

标签: php json

我想在PHP中发布以下JSON HTTP API请求

Rails.application.routes.draw do

  mount RailsAdmin::Engine => '/admin', as: 'rails_admin'

  root 'static_pages#home'
  resources :contacts, only: [:new, :create]
  resources :users
  resources :account_activations, only: [:edit]
  get  '/help', to: 'static_pages#help'
  get  '/about', to: 'static_pages#about'
  get  '/subscribe', to: 'static_pages#subscribe'
  get  '/signup',  to: 'users#new'
  post '/signup',  to: 'users#create'
  get 'sessions/new', to: 'sessions#new'
  get    '/login',   to: 'sessions#new'
  post   '/login',   to: 'sessions#create'
  get '/logout',  to: 'sessions#destroy' , via: :delete
  get '/resend', to: 'users#resend'
  post '/resend_activation', to: 'users#resend_activation'

end

1 个答案:

答案 0 :(得分:0)

您可以尝试以下代码

sequential